Repository navigation
fix(report): answer a PDF print timeout with 413 and an explanation - #97
Merged
Merged
Conversation
Page.printToPDF timing out (a very large export) escaped as the raw puppeteer error and became a bare 500. It is now wrapped in PdfPrintTimeoutError, not retried (a retry cannot make the report smaller), and AllExceptionsFilter replies 413 with code PDF_PRINT_TIMEOUT and a message asking to narrow the filter or export to Excel. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GTicqgTde92c75hERgg3v
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.
What
When
Page.printToPDFtimed out (a very large export, e.g. a pivot report withlimit=20000), the raw puppeteer error escaped and the request ended as a bare 500.Change
MarkupToPdfReportGeneratorwraps the print timeout in a newPdfPrintTimeoutError(codePDF_PRINT_TIMEOUT). It is not retried, since a retry cannot make the report smaller.AllExceptionsFilterreplies 413 with that code and a message asking to narrow the filter (e.g. a shorter date range) or export to Excel. It is logged as a warning.Tests
yarn jest utils/report utils/logging: new cases for the generator (wraps, no retry, browser closed) and for the filter (413 body, noresponse.err).No consumer action needed after a submodule bump; clients can map
codeto a localized message if they want.Generated by Claude Code