forked from quandl/quandl-python
-
Notifications
You must be signed in to change notification settings - Fork 0
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 quandl#70 from quandl/AP-1808/handle-bad-error-res…
…ponse handle non-json non quandl error responses
- Loading branch information
Showing
5 changed files
with
30 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
### 3.0.1 - 2016-05-25 | ||
|
||
* Handle unexpected errors | ||
|
||
### 3.0.0 - 2016-04-22 | ||
|
||
* Datatables for developers | ||
|
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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
class QuandlError(RuntimeError): | ||
def __init__(self, quandl_message, http_status=None, http_body=None, http_headers=None, | ||
GENERIC_ERROR_MESSAGE = 'Something went wrong. Please try again. \ | ||
If you continue to have problems, please contact us at [email protected].' | ||
|
||
def __init__(self, quandl_message=None, http_status=None, http_body=None, http_headers=None, | ||
quandl_error_code=None, response_data=None): | ||
self.http_status = http_status | ||
self.http_body = http_body | ||
self.http_headers = http_headers if http_headers is not None else {} | ||
|
||
self.quandl_error_code = quandl_error_code | ||
self.quandl_message = quandl_message | ||
self.quandl_message = quandl_message if quandl_message is not None \ | ||
else self.GENERIC_ERROR_MESSAGE | ||
self.response_data = response_data | ||
|
||
def __str__(self): | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
VERSION = '3.0.0' | ||
VERSION = '3.0.1' |
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