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

Only debug log the HTML of failed API requests #2862

Merged
merged 1 commit into from
Dec 14, 2024
Merged

Only debug log the HTML of failed API requests #2862

merged 1 commit into from
Dec 14, 2024

Conversation

Kevinjil
Copy link
Contributor

fixes #2842

Copy link
Member

@vmcj vmcj left a comment

Choose a reason for hiding this comment

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

This would do it twice though, as L211 does the same right?

@Kevinjil
Copy link
Contributor Author

I propose a different solution. Always log the response text to the debug console, and only print it to the user if it was a valid JSON response. The response message in JSON format returned from the API can actually be informative for users as to why the request failed.

submit/submit Outdated Show resolved Hide resolved
If the response is not valid JSON, do not print it to stdout and only
log it to debug output.
@Kevinjil Kevinjil enabled auto-merge December 14, 2024 15:31
@Kevinjil Kevinjil added this pull request to the merge queue Dec 14, 2024
Merged via the queue into main with commit 0cfe72c Dec 14, 2024
41 checks passed
@Kevinjil Kevinjil deleted the submit-html branch December 14, 2024 15:53
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.

Bad API error handling in submit client
3 participants