Skip to content

Instantly share code, notes, and snippets.

@ZaninAndrea
Created April 4, 2022 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZaninAndrea/8a22744867b57103b41f016c4f262c13 to your computer and use it in GitHub Desktop.
Save ZaninAndrea/8a22744867b57103b41f016c4f262c13 to your computer and use it in GitHub Desktop.
Parsing Igloo errors
parsed_response = json.loads(response.text)
if "errors" in parsed_response.keys():
# Raise an error using the first error message in the response
raise Error(parsed_response["errors"][0]["message"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment