mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: give remove-background job timeouts an actionable failure message (#518)
Extends the worker.ts timeout failure detail with actionable guidance (first-run model download, input too large for CPU inference, or busy/unavailable worker) while preserving the "Timed out after Ns" prefix so error_code classification, SSE terminal replay, and existing timeout assertions keep working. Adds a test assertion for the guidance. Fixes #494
This commit is contained in:
@@ -116,6 +116,10 @@ describe("Worker timeout classification", () => {
|
||||
// Error message must mention timeout
|
||||
const error = finalRow?.error as { message: string };
|
||||
expect(error.message).toMatch(/timed out after 1s/i);
|
||||
// Fail-fast message must include actionable guidance (issue #494)
|
||||
expect(error.message).toMatch(
|
||||
/model may still be downloading|too large for CPU|worker may be busy/i,
|
||||
);
|
||||
|
||||
// Both attempts ran (attempts column is set at the start of each attempt)
|
||||
expect(finalRow?.attempts).toBe(2);
|
||||
|
||||
Reference in New Issue
Block a user