Skip to content

Incorrect parsing of frames if a path is in an exception message #5498

Closed
@billyvg

Description

@billyvg

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/react

SDK Version

7.8.0

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

Capturing this exception:

Sentry.captureException(new Error('NotFoundError: GET /organizations/{orgSlug}/events/ 404'))

Leads to this code in the core SDK
image

where the path in the exception message gets matched with the regex and is mistaken as a frame:

image

This then gets filtered by inbound filters as it does not match any URLs in allowUrls.

Expected Result

Frame at index 0 should not exist

image

Actual Result

image

As a workaround, I'm wrapping the pathname in quotes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: browserIssues related to the Sentry Browser SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions