-
Notifications
You must be signed in to change notification settings - Fork 12
include console.error logs in the error docs #3862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances error documentation by capturing console.error and console.assert log messages that occur during prerendering operations and including them in error reports via the additionalErrors field. This provides better debugging context when renders fail.
Changes:
- Added console error tracking infrastructure to the PagePool class with deduplication and limiting
- Modified RenderRunner to merge console errors into error responses across all prerender methods
- Added test coverage for console error capture when renders fail and successful renders with console errors
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/realm-server/prerender/page-pool.ts | Added console error tracking with ConsoleErrorEntry type, storage by page ID, and methods to reset/retrieve console errors with deduplication logic |
| packages/realm-server/prerender/render-runner.ts | Added #mergeConsoleErrors method and integrated it into all three prerender methods (card, module, file extract) to append console errors to error responses |
| packages/realm-server/tests/prerendering-test.ts | Added test fixtures and test cases to verify console errors are captured on failure and ignored on success |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Host Test Results 1 files ± 0 1 suites ±0 1h 36m 27s ⏱️ + 3m 50s Results for commit 21ff6c7. ± Comparison against base commit 4eaa075. This pull request removes 1 and adds 206 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This PR updates our error docs to also capture any console.error log messages in our error doc for better understanding of the issue.