Skip to content

fix(cli): Handle malformed sourcemaps and timestamps - #1609

Open
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/cli-malformed-data-guards
Open

sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/cli-malformed-data-guards

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor
  • sentry sourcemap inject crashed with a bare SyntaxError when a companion .map file wasn't valid JSON. It now throws a ValidationError that names the file, before touching the JS bundle. The dry-run path already handled this case.
  • formatRelativeTime printed the literal text "Invalid Date" for a timestamp it couldn't parse. It now shows the same muted dash as a missing timestamp.

Ported from getsentry/cli#1118 and getsentry/cli#1200, which are being closed with the repo archive. The other fixes in those PRs were already on main or not worth porting (details in the close comments).

via BYK.

--

View Junior Session in Sentry

- `sentry sourcemap inject` crashed with a bare SyntaxError when a
  companion .map file was not valid JSON. It now throws a ValidationError
  that names the file, before touching the JS bundle. The dry-run path
  already tolerated this.
- formatRelativeTime rendered the literal text "Invalid Date" for an
  unparseable timestamp. It now shows the same muted dash as a missing
  one.

Ported from getsentry/cli#1118 and getsentry/cli#1200.

Co-Authored-By: BYK <burak.kaya@sentry.io>
@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Oct 22, 2026 6:31pm UTC

Request Review

This branch was previously deployed

1 inactive deployment
Preview — 8db64de8 Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants