Skip to content

Conversation

@gordonwoodhull
Copy link
Contributor

Summary

  • When Typst compilation fails (e.g., PDF/UA compliance errors), show only the Typst error message without a confusing internal stack trace
  • Uses ErrorEx with printStack=false for clean user-facing errors
  • Also adds support for array of printsMessage checks in smoke tests (enabling tests for both presence AND absence of messages)

Fixes #13942

Test plan

  • Tested in production build - error output now shows:
    ERROR: error: PDF/UA-1 error: missing alt text
        ...
    ERROR: Typst compilation failed
    
    Without the stack trace that was previously shown.

🤖 Generated with Claude Code

Allows testing for both presence AND absence of specific messages
in a single test by passing an array to printsMessage.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Jan 26, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Use ErrorEx with printStack=false so users see only the Typst error
message without a confusing internal stack trace.

Fixes #13942

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

pdf-standard leads to stacktrace

3 participants