flask/examples
Tang Vu d2e34be0f6 refactor: celery task result endpoint crashes on task failure
When a Celery task fails, `result.ready()` evaluates to `True` but `result.successful()` is `False`. 
Calling `result.get()` without `propagate=False` on a failed task will re-raise the task's exception, causing the Flask endpoint to crash with a 500 Internal Server Error instead of returning the task's failed status. 
Additionally, if `result.result` is an Exception object, returning it directly in the dictionary will cause a `TypeError` during JSON serialization.


Affected files: views.py

Signed-off-by: Tang Vu <vuminhtang2212@gmail.com>
2026-03-28 04:19:28 +07:00
..
celery refactor: celery task result endpoint crashes on task failure 2026-03-28 04:19:28 +07:00
javascript Merge remote-tracking branch 'origin/stable' 2024-11-13 08:43:48 -08:00
tutorial Abort if the instance folder cannot be created 2026-01-27 09:18:37 +01:00