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

fix: collect errors from record without exception #2610

Merged
merged 2 commits into from Mar 25, 2024

Conversation

Paul-Bob
Copy link
Contributor

Description

Fixes #2602

Collect errors from record even if nothing is raised. Errors can be added on callbacks without raising exception. Action fail if any error is present

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@Paul-Bob Paul-Bob added the Fix label Mar 18, 2024
@Paul-Bob Paul-Bob self-assigned this Mar 18, 2024
Copy link

codeclimate bot commented Mar 18, 2024

Code Climate has analyzed commit 290d118 and detected 0 issues on this pull request.

View more on Code Climate.

@adrianthedev
Copy link
Collaborator

I wonder what side effects this might have for existing users.
Maybe some existing users have some errors in their models that fail silently. This PR will trigger errors for them, is that correct?

@Paul-Bob
Copy link
Contributor Author

Maybe some existing users have some errors in their models that fail silently. This PR will trigger errors for them, is that correct?

If there are errors on the record but no exception is raised it does not fail right now, the record is saved and errors are swallowed.

If someone is in this scenario yes, same workflow will now break with this approach and show the errors, IMO that's good, if errors are present the create / update action should fail.

@adrianthedev
Copy link
Collaborator

Got it!
Sounds good!
Let's ship it and make a note in the upgrade guide.

@Paul-Bob Paul-Bob merged commit 8dc5609 into main Mar 25, 2024
19 checks passed
@Paul-Bob Paul-Bob deleted the fix/perform_action_and_record_errors branch March 25, 2024 09:50
Copy link
Contributor

This PR has been merged into main. The functionality will be available in the next release.

Please check the release guide for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle when there is error but no exception
2 participants