-
Notifications
You must be signed in to change notification settings - Fork 11
fix: don't parse error 500 #857
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
fix: don't parse error 500 #857
Conversation
The error may not be a json message or the json message may not contains message/errors attributes. This change make the logging more generic and just print the HTTP response. Change-Id: I8fdbd8000f6bd3135705852a5eb7943d4d9d9199
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 🤖 Continuous IntegrationWonderful, this rule succeeded.
🟢 👀 Review RequirementsWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
🧪 CI InsightsHere's what we observed from your CI run for ac2d4cb. 🟢 All jobs passed!But CI Insights is watching 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the HTTP error handling in check_for_status() to simplify the error reporting logic and remove the explicit sys.exit(1) call, instead relying on response.raise_for_status() to propagate exceptions.
- Removed special handling for 4xx status codes and now treats all HTTP errors (4xx and 5xx) uniformly
- Simplified error message display to show raw response text instead of parsing JSON and extracting specific fields
- Removed the
sysimport as it's no longer needed
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Queue status✅ The pull request has been merged This pull request spent 5 seconds in the queue and **** waiting for CI. Required conditions to merge
|
The error may not be a json message or the json message may not
contains message/errors attributes.
This change make the logging more generic and just print the HTTP
response.