-
Notifications
You must be signed in to change notification settings - Fork 214
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: Replace RequestError with BadRequestError #3172
Conversation
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.
The changes look good to me except the lint error. Approving to unblock merge once this is fixed (failing CI is blocking the merge already).
@@ -9,7 +9,7 @@ | |||
from django.conf import settings | |||
from django.core.cache import cache | |||
|
|||
from elasticsearch.exceptions import NotFoundError, RequestError | |||
from elasticsearch.exceptions import NotFoundError, BadRequestError |
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.
I believe the lint error we're seeing is about the order of the imports. Imports are sorted alphabetically so placing BadRequestError first should fix it.
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.
Understood @dhruvkb, will change in a while.
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.
I ran just lint
and committed the changes (the imports were sorted alphabetically).
Thank you for your contribution, and also for finding and updating the exceptions in documentation!
Thank you so much for you appreciation @obulat :) |
Fixes #3169 by @CodeAnk2829
Description
api/controllers/search_controller
imports an exception (RequestError
) that does not exist causes an unexpected error. This PR fixes the issue by replacingRequestError
withBadRequestError
.Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin