Repository navigation
Conversation
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.
Malformed Chart.js configurations currently become HTTP 500 responses with stack-trace logs and empty
X-quickchart-errorheaders. This turns ordinary input mistakes into operational noise.The exact
Cannot create property 'datasets' on stringfailure is reproducible with{type: 'bar', data: 'graph TD; A --> B'}. A top-level expression evaluating to a string fails earlier while QuickChart applies defaults, and raw Mermaid fails JavaScript evaluation. All three returned 500 on the unchanged base.This change:
ChartConfigErrorfor known input failures. GET/POST PNG, SVG, and PDF responses return 400 with a useful message; logging emits a fixed info event without the submitted input or exception stack.Validation:
9c31a0b: 38 existing tests passing.yarn test: 102 passing (64 new regression cases).git diff --checkpass.Deployment scope: this PR changes the public OSS repository only. It does not establish that a hosted service uses this commit or these dependencies. Before applying it to another deployment, identify the immutable image and source commit, compare its renderer/error middleware, and verify 400 responses plus stack-free validation logging in staging. The public renderer already disables Chart.js animation; an animation-origin
window is not definederror needs its own reproduction and should not be hidden by a blanket exception rule.