-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Remove custom error types #2110
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.
Are the error strings produced now identical to those produced earlier? If not, we might be messing up with some scripting built around assumptions on error string.
No, the error strings are enhanced for a better message than a generic message. These functions are invoked via |
This doesn't seem like a particularly common error message that clients would script for, therefore my opinion is that the improved error messages outweigh the backward compatibility concern in this case. |
This commit removes the custom error types that are not used by the consumers Signed-off-by: manish <manish.sethi@gmail.com>
509a076
to
ded8734
Compare
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.
Approving, but let's see if @sykesm or @ale-linux have any final comments about error message backward compatibility.
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.
IMO, for error checking at the client side, error codes might be the correct choice instead of string comparison. The client side scripting cannot rely on error string as it need not be constant across releases.
I’m fine with this. |
This commit removes the custom error types that are not used by the consumers
Type of change
Additional details
Previously one of the custom error types
NotFoundInIndexErr
was used in the validation path, with this PR, it's no longer the case.