-
Notifications
You must be signed in to change notification settings - Fork 894
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
[Query enhancements] use status 503 if search strategy throws 500 #8876
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Joshua Li <[email protected]>
❌ Empty Changelog SectionThe Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8876 +/- ##
==========================================
- Coverage 60.93% 60.88% -0.06%
==========================================
Files 3800 3805 +5
Lines 90880 90963 +83
Branches 14324 14345 +21
==========================================
+ Hits 55382 55387 +5
- Misses 31969 32047 +78
Partials 3529 3529
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
const statusCode = error.status || err.status; | ||
return res.custom({ | ||
statusCode: error.status || err.status, | ||
statusCode: statusCode === 500 ? 503 : statusCode || 503, |
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.
can we validate this behavior in a test?
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.
added a basic test
Signed-off-by: Joshua Li <[email protected]>
i think the test failures might be due to tests needing to be updated, or snapshots |
❌ Empty Changelog SectionThe Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section. |
failure seems irrelevant, they passed on rerun
|
Description
use status 503 if search strategy throws 500 to indicate downstream service failure
Issues Resolved
Screenshot
Testing the changes
when opensearch is down, send a request to enhancements api:
before
after
Changelog
Check List
yarn test:jest
yarn test:jest_integration