Skip to content
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

Add errorCode to failure type InternalServerError #16186

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

kfaraz
Copy link
Contributor

@kfaraz kfaraz commented Mar 22, 2024

Looking at other failure types such as InvalidInput, InvalidSqlInput, etc. it makes sense to have the error code be fixed for a certain of failure.

The only two usages of the method InternalServerError.exception() were actually passing a whole long message in the error code. This would result in the errorCode field being populated with the error message and the errorMsg field itself taking the value of the first message argument.

Changes

  • Use error code internalServerError for failures of this type
  • Remove the error code argument from InternalServerError.exception() methods thus fixing the above mentioned bug in the callers.

@kfaraz kfaraz merged commit 323d67a into apache:master Mar 23, 2024
85 checks passed
@kfaraz kfaraz deleted the fix_exception_error_code branch March 23, 2024 22:54
@kfaraz
Copy link
Contributor Author

kfaraz commented Mar 23, 2024

Thanks for the review, @LakshSingla !

@adarshsanjeev adarshsanjeev added this to the 30.0.0 milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants