Skip to content

Commit

Permalink
improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
c-e-p committed May 26, 2023
1 parent e961a44 commit daf64b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ourchive_app/frontend/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def append_root_url(url):
return f"{settings.API_PROTOCOL}{settings.ALLOWED_HOSTS[0]}/{url}"

def get_results(results):
results_json = results.json() if (results.status_code != 204 and results.status_code != 500) else {}
results_json = results.json() if (results.status_code != 204 and results.status_code != 500 and results.status_code != 403 and results.status_code != 404) else {}
results_status_code = results.status_code
return [results_json, results_status_code]

Expand Down

0 comments on commit daf64b8

Please sign in to comment.