Replies: 1 comment
-
I don't think there's a "preferred" way. There are a few different options. Presumably you need to change application behaviour rather than this just being useful for debugging? Smuggling the data out and saving it to a DB model might be a better way, or possibly changing the return type so the task always succeeds but then stores extra context. Alternatively, handle |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using django-tasks to run a task that sometimes fails. When it fails I have access to stacktrace and the error raised. But if the exception itself has more information it's not captured, this is behavior is documented.
But I would like a way to capture additional information about the task failure.
In my code I raise the following exception:
And only the exception type and stacktrace are stored in the database.
I'm wondering what would be a good way to store the additional information from the error in the task.
This could be solved by logs as well. For example prefixing all the logs with
task_id
and then search the logs.Beta Was this translation helpful? Give feedback.
All reactions