Attribute Error should be caught in backends base exception #5435
Merged
Conversation
Contributor
Author
|
this solves an issue I'm seeing where django db models is raising a DoesNotExist exception, but when celery tries to reraise this exception on the backend, it is finding a different module which doesn't have the DoesNotExist attribute. |
Member
|
can you add a small test for this? |
…t exception adding simple unit test
Contributor
Author
|
@auvipy done |
Member
|
thanks, will come back after making the master stable |
thedrow
approved these changes
Apr 4, 2019
auvipy
approved these changes
Apr 5, 2019
This was referenced Sep 8, 2019
nijel
added a commit
to WeblateOrg/docker
that referenced
this pull request
Sep 8, 2019
Taken from celery/celery#5435 Fixes WeblateOrg/weblate#3003 Signed-off-by: Michal Čihař <[email protected]>
cdknorow
added a commit
to cdknorow/celery
that referenced
this pull request
Oct 7, 2019
…t exception (celery#5435) adding simple unit test
jeyrce
pushed a commit
to jeyrce/celery
that referenced
this pull request
Aug 25, 2021
…t exception (celery#5435) adding simple unit test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Celery looks for exceptions in sys.modules and catches a keyerror if it doesn't exist. However, it is also possible that it finds the exec_module but finds the wrong one. In this case an Attribute Error gets raised. It would be nice if celery caught that exception and created a custom exception class that correctly propogates the error message instead of raising a new one.