Repository navigation
fix(report): answer 503 with a stable error code when the PDF render queue is full - #92
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by הדסה · project thread
Fixes buzz-code/ops#46
What
PdfRenderQueueTimeoutError(from #90) fell throughAllExceptionsFilteras a generic 500Internal server error. It is a temporary overload, so the filter now replies:{ statusCode: 503, code: 'PDF_RENDER_BUSY', message: 'PDF generation is busy with other requests. Please try again in a few minutes.' }Retry-After: 60warn, not attached toresponse.err(not counted as a server error)PdfRenderQueueTimeoutErrorgets a stablecodeproperty (PDF_RENDER_BUSY_CODE). The error message itself is unchanged.The client side (nra-client, same branch name) maps
codeto a localized message in Hebrew/English. Older clients just show the English fallback.Consumer changes
None: purely additive, no env vars.
Tests
utils/logging+utils/report: 16 suites, 122 tests pass. (Locally, the yemot e2e andget-selected-idssuites fail withNo metadata for "User"because the checkout is not in theserver/sharedconsumer layout. That is unrelated to this change; CI uses the right layout.)Generated by Claude Code