-
-
Notifications
You must be signed in to change notification settings - Fork 270
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: add model-unrelated errors to alerts #2813
fix: add model-unrelated errors to alerts #2813
Conversation
Code Climate has analyzed commit 4cb801c and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
This PR has been merged into Please check the release guide for more information. |
@errors = @errors.reject { |error| exception_message.include? error } | ||
end | ||
|
||
# Figure out if we have to output the exception_message | ||
# Usually it means that it's not a validation error but something else | ||
if exception_message.present? | ||
exception_is_validation = @errors.select { |error| exception_message.include? error }.present? | ||
end |
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.
Since this code
@errors = @errors.reject { |error| exception_message.include? error }
runs before this one
exception_is_validation = @errors.select { |error| exception_message.include? error }.present?
will the second one ever be true?
Description
The create failing action already has a
turbo_stream
response.This PR adds it to the update action as well.
We also add any exception error to the response.
Checklist: