-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from prkumar/feature/v0.7.0/client-exceptions
Add `Consumer.exceptions` property for handling client exceptions
- Loading branch information
Showing
10 changed files
with
229 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class _UnmappedClientException(BaseException): | ||
pass | ||
|
||
|
||
class Exceptions(object): | ||
"""Enum of standard HTTP client exceptions.""" | ||
|
||
BaseClientException = _UnmappedClientException | ||
"""Base class for client errors.""" | ||
|
||
ConnectionError = _UnmappedClientException | ||
"""A connection error occurred.""" | ||
|
||
ConnectionTimeout = _UnmappedClientException | ||
"""The request timed out while trying to connect to the remote server. | ||
Requests that produce this error are typically safe to retry. | ||
""" | ||
|
||
ServerTimeout = _UnmappedClientException | ||
"""The server did not send any data in the allotted amount of time.""" | ||
|
||
SSLError = _UnmappedClientException | ||
"""An SSL error occurred.""" | ||
|
||
InvalidURL = _UnmappedClientException | ||
"""The URL provided was somehow invalid.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters