Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle unexpected json structure in error payload #95

Conversation

mark-oppenheim
Copy link
Contributor

Addresses the issue where handling any API error response that does not conform to expected JSON response raises KeyError rather providing information about the HTTP error.

Works by catching any KeyErrors and instead providing a generically informative exception message based on the one reported if there is no JSON payload.

closes: #92

@mark-oppenheim
Copy link
Contributor Author

@sfc-gh-xhuang could you arrange for the tests to run? Even in the CI workflows it appears they don't have access to the key.

@sfc-gh-xhuang
Copy link
Collaborator

Test successfully ran with copy PR #96

@sfc-gh-xhuang sfc-gh-xhuang merged commit daa25c3 into snowflakedb:master Aug 26, 2024
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error handling makes unreliable assumptions about the structure of the payload
3 participants