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

Updated error message to include server side errors if present. #183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

neshdev
Copy link
Member

@neshdev neshdev commented Nov 15, 2024

Error message to include server side error messages if present in payload.

BUG=b/375194356

@neshdev neshdev requested review from a team and mohami2000 November 15, 2024 20:46
@@ -58,6 +58,9 @@ def kaggle_api_raise_for_status(response: requests.Response, resource_handle: Op
response.raise_for_status()
except requests.HTTPError as e:
message = str(e)
server_error_message = response.json().get("message", "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess some response are not json format so it fails some integration tests?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

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.

3 participants