Skip to content

fix(report): answer 503 with a stable error code when the PDF render queue is full - #92

Merged
buzz-code merged 1 commit into
mainfrom
claude/project-thread-tgebkb
Nov 4, 2026
Merged

buzz-code merged 1 commit into
mainfrom
claude/project-thread-tgebkb

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Requested by הדסה · project thread

Fixes buzz-code/ops#46

What

PdfRenderQueueTimeoutError (from #90) fell through AllExceptionsFilter as a generic 500 Internal server error. It is a temporary overload, so the filter now replies:

  • status 503
  • body { statusCode: 503, code: 'PDF_RENDER_BUSY', message: 'PDF generation is busy with other requests. Please try again in a few minutes.' }
  • header Retry-After: 60
  • logged as warn, not attached to response.err (not counted as a server error)

PdfRenderQueueTimeoutError gets a stable code property (PDF_RENDER_BUSY_CODE). The error message itself is unchanged.

The client side (nra-client, same branch name) maps code to a localized message in Hebrew/English. Older clients just show the English fallback.

Consumer changes

None: purely additive, no env vars.

Tests

  • New filter spec case for the 503 / code / Retry-After.
  • utils/logging + utils/report: 16 suites, 122 tests pass. (Locally, the yemot e2e and get-selected-ids suites fail with No metadata for "User" because the checkout is not in the server/shared consumer layout. That is unrelated to this change; CI uses the right layout.)

Generated by Claude Code

…queue is full

PdfRenderQueueTimeoutError used to fall through AllExceptionsFilter as a
generic 500 "Internal server error". It is a temporary overload, not a
server bug, so reply 503 with `code: 'PDF_RENDER_BUSY'`, an English
fallback message and a Retry-After header. Clients map the code to a
localized "busy, try again shortly" message.

Fixes buzz-code/ops#46

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GTics1vhDVoBFRPcg7nSn
@buzz-code buzz-code self-assigned this Nov 4, 2026
@buzz-code
buzz-code merged commit 85cf199 into main Nov 4, 2026
1 check passed
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.

2 participants