Skip to content

feature: enchanced error messages#23

Merged
trogulja merged 1 commit intomasterfrom
feature/enhanced-error-messages
Jan 28, 2026
Merged

feature: enchanced error messages#23
trogulja merged 1 commit intomasterfrom
feature/enhanced-error-messages

Conversation

@trogulja
Copy link
Copy Markdown
Collaborator

@trogulja trogulja commented Jan 28, 2026

Summary

Enriches error messages throughout the library to provide better debugging context when failures occur, especially for production issues.

Changes

  • Network timeout errors - Track all network requests during setContent and report pending/failed requests on timeout
  • Body PDF loading errors - Include document-page index, layout dimensions, and buffer size
  • Section PDF loading errors - Include section type (header/footer/background), page number, and dimensions
  • PDF embedding errors - Include element type, page number, and layout coordinates
  • No document pages found - Include template diagnostic info (child elements, HTML preview)
  • Version bump - 1.1.1 → 1.1.2
  • CLAUDE.md - Added project guidance file

Example error output

Before:

Error: Timed out after waiting 30000ms

After:

Error: Timed out after waiting 30000ms | Network: 2 pending, 1 failed | Pending: https://example.com/font.ttf | Failed: https://example.com/image.png (net::ERR_CONNECTION_REFUSED)

Test plan

  • All unit tests pass (165 tests)
  • New tests added for network tracking error enrichment
  • Visual test excluded (expected rendering differences)

🤖 Generated with Claude Code

@trogulja trogulja merged commit dfb1f37 into master Jan 28, 2026
1 check passed
@trogulja trogulja deleted the feature/enhanced-error-messages branch January 28, 2026 15:51
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