Skip to content

Commit

Permalink
Use ValueError isntead of JsonDecodeError. (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed Apr 7, 2018
1 parent 02f3b43 commit fae9577
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bunq/sdk/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import uuid
from json import JSONDecodeError
from urllib.parse import urlencode

import requests
Expand Down Expand Up @@ -251,7 +250,7 @@ def _fetch_all_error_message(self, response):
error_dict = converter.json_to_class(dict, response_content_string)

return self._fetch_error_descriptions(error_dict)
except JSONDecodeError:
except ValueError:
return [response_content_string]

def _fetch_error_descriptions(self, error_dict):
Expand Down

0 comments on commit fae9577

Please sign in to comment.