Skip to content

fix(tts): include status, attempts, and last HTTP code in LucyLab polling timeout#4

Open
nguyentran4896 wants to merge 1 commit into
hoquanghai:mainfrom
nguyentran4896:fix/lucylab-timeout-error-detail
Open

fix(tts): include status, attempts, and last HTTP code in LucyLab polling timeout#4
nguyentran4896 wants to merge 1 commit into
hoquanghai:mainfrom
nguyentran4896:fix/lucylab-timeout-error-detail

Conversation

@nguyentran4896
Copy link
Copy Markdown

Summary

  • Problem: When a LucyLab TTS polling job times out, the original error message was generic: LucyLab export <id> polling timeout after <ms>ms. Users had no way to distinguish slow processing, server-side failure, auth problems (401/403), or network issues.
  • Fix: The polling loop now tracks lastStatus, pollAttempts, elapsed seconds, and the last HTTP status/response snippet. On timeout, the error includes all of this context.
  • Tests added: Two new test cases verify (a) the error message for a stuck pending job contains the job ID, last status, and attempt count; (b) when all polls return 401, the error says "no successful poll" and includes the HTTP 401 status.

Before / After

Before:

Error: LucyLab export exp-abc polling timeout after 60000ms

After (stuck pending):

Error: LucyLab export exp-abc polling timeout after 60s (60000ms limit). Attempts=12. last status="pending", HTTP=ok. Check: (a) API key valid? (b) job status on LucyLab dashboard? (c) network connectivity?

After (auth failure):

Error: LucyLab export exp-abc polling timeout after 60s (60000ms limit). Attempts=12. no successful poll, last HTTP=401, response="{"error":"Unauthorized"}". Check: (a) API key valid? (b) job status on LucyLab dashboard? (c) network connectivity?

Test plan

  • npm run typecheck passes (0 errors)
  • npm test passes (46 tests, 9 test files)
  • New tests cover stuck-pending timeout (job id + status + attempts in message)
  • New tests cover all-polls-fail-401 timeout (HTTP 401 + "no successful poll" in message)

🤖 Generated with Claude Code

…ling timeout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
roottxt pushed a commit to roottxt/auto-create-video that referenced this pull request May 7, 2026
…anghai#4)

CI infrastructure
- Add .github/workflows/test.yml — runs vitest + tsc on every push/PR
- Add .github/workflows/typecheck.yml — fast typecheck-only job for
  faster feedback on TS-only PRs
- Both run on ubuntu-latest with Node 22 and npm cache

README updates (mirrored in README.md and README.vi.md)
- Replace fake static "tests-35-passing" badge with dynamic
  GitHub Actions badges that link to the workflow runs
- Add separate Typecheck badge alongside Tests badge
- Update test count 35 -> 44 to match the actual current suite
- Quick Start: split into Path A (Claude Code, recommended) and
  Path B (hand-written script.json), so visitors without Claude
  Code can still run the pipeline
- HyperFrames vs Remotion FAQ: rewrite from defensive
  ("would be a 2-3 week rewrite for no real win") to a confident
  positioning ("different tools for different jobs"); keep the
  list of ideas borrowed from Remotion's design
- Add <a id="top"></a> at the very top of both files and change
  the "Back to top" anchor target from #-auto-news-video (which
  GitHub may slug differently) to #top so the link reliably
  jumps to the top

Verified locally before commit: vitest passes 44/44 tests in 6s,
tsc --noEmit returns 0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant