Answer the question
In order to leave comments, you need to log in
How can you catch errors from other libraries in celery?
Hello everyone, who knows how to properly catch errors in celery, I have try except, but I get an error
TypeError: catching classes that do not inherit from BaseException is not allowed
try:
await client_new(UpdateUsernameRequest(username=new_username))
updated = True
except (UsernameOccupiedError, UsernameInvalidError):
updated = False
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question