Skip to content

Commit

Permalink
Get message from response
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed Jun 1, 2023
1 parent bfe2dfc commit ff8eae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wcivf/apps/elections/devs_dc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class DevsDCAPIException(Exception):
def __init__(self, response: requests.Response):
try:
self.message = {"error": response.json().get("detail", "")}
self.message = {"error": response.json().get("message", "")}
except JSONDecodeError:
self.message = ""
self.status = response.status_code
Expand Down

0 comments on commit ff8eae3

Please sign in to comment.