You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ai-fal): handle errors from fal result fetch on completed jobs (#396)
* fix(ai-fal): handle FAILED queue status to prevent infinite polling
Map fal.ai's FAILED queue status to 'failed' instead of falling through
to the default case which incorrectly returned 'processing'. Unknown
statuses now also map to 'failed' as a safety net. Error details from
fal responses are surfaced in VideoStatusResult.error.
Closes#394
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(ai-fal): handle errors from fal result fetch on completed jobs
fal.ai never returns a FAILED queue status — invalid jobs go through
IN_PROGRESS → COMPLETED, and the real error (e.g. 422 validation)
only surfaces when calling fal.queue.result(). This extracts detailed
error info from the result fetch, removes the fictional FAILED status
handling, and returns failed status from getVideoJobStatus when the
result fetch throws.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: update changeset to reflect actual fix
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
fix: handle errors from fal result fetch on completed jobs
7
+
8
+
fal.ai does not return a FAILED queue status — invalid jobs report COMPLETED, and the real error (e.g. 422 validation) only surfaces when fetching results. `getVideoUrl()` now catches these errors and extracts detailed validation messages. `getVideoJobStatus()` returns `status: 'failed'` when the result fetch throws on a "completed" job.
0 commit comments