-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 Fix errors observed in front-end due to the HTTP reason attribute and new lines
#7755
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 errors observed in front-end due to the HTTP reason attribute and new lines
#7755
Conversation
|
@mergify queue |
🛑 The pull request has been merged manuallyThe pull request has been merged manually at 5028e5a |
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 fixes front-end errors caused by newline characters in the HTTP reason attribute by sanitizing these messages. Key changes include:
- Replacing newline characters in error messages within the exception class.
- Applying a similar sanitization in the error response factory to prevent HTTP error misconfiguration.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| services/web/server/src/simcore_service_webserver/exporter/exceptions.py | Introduces message sanitization in the HTTP exception initialization |
| services/web/server/src/simcore_service_webserver/exception_handling/_factory.py | Applies newline replacement for HTTP reason in the JSON response factory |
Comments suppressed due to low confidence (1)
services/web/server/src/simcore_service_webserver/exception_handling/_factory.py:44
- Ensure that the error message sanitization is consistent across the codebase; if similar logic is used elsewhere, consider centralizing this functionality to prevent future discrepancies.
reason=error.message.replace("\n", " ") if error.message else None,
services/web/server/src/simcore_service_webserver/exporter/exceptions.py
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7755 +/- ##
==========================================
- Coverage 87.34% 83.80% -3.54%
==========================================
Files 1841 701 -1140
Lines 71456 33286 -38170
Branches 1214 174 -1040
==========================================
- Hits 62410 27895 -34515
+ Misses 8703 5333 -3370
+ Partials 343 58 -285
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
sanderegg
left a comment
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.
💯
|



What do these changes do?
Found some more fixes for invalid HTTP
reasonattribute observed in the front-end:Related issue/s
How to test
Dev-ops