Created
April 4, 2022 08:57
-
-
Save ZaninAndrea/8a22744867b57103b41f016c4f262c13 to your computer and use it in GitHub Desktop.
Parsing Igloo errors
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
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