Skip to content

Add more information from response object to APIError during file upload #289

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

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

avnermay
Copy link
Contributor

@avnermay avnermay commented Apr 2, 2025

Not much information is currently shared when there is an error during file upload. Adding more info from response object.

I copied the way the APIError was created here:

raise APIError(
f"Unexpected error raised by endpoint: {response.content.decode()}, headers: {response.headers}",
http_status=response.status_code,
)

Fixes #ENG-25010

@avnermay avnermay requested review from artek0chumak, mryab and connermanuel and removed request for mryab April 2, 2025 15:46
@artek0chumak artek0chumak merged commit e0de91e into main Apr 2, 2025
9 checks passed
@artek0chumak artek0chumak deleted the avner/descriptive-file-upload-error branch April 2, 2025 17:33
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