Skip to content

Http client errors not sent when relay is hosted on the same domain. #17385

Closed

Description

@rodolfoBee

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react

SDK Version

9.40.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

  1. Configure relay to listen to events on my.domain.com.
  2. Configure the SDK to send events via relay.
  3. Trigger 5xx errors when sending Fetch or XHR requests to my.domain.com

Expected Result

The SDKs HttpClient integration detects the error and sends via relay. The SDK logs when relay is hosted on a different domain (for example, my.ingest.domain.com):

POST https://my.domain.com/api/v1/.... 500 (Internal Server Error)
Sentry Logger [log]: Captured error event `HTTP Client Error with status code: 500`

Actual Result

The SDK does not send the event to relay when it is hosted in the same domain. The SDK logs do not show the entry Sentry Logger [log]: Captured error event HTTP Client Error with status code: 500` after the error:

POST https://my.domain.com/api/v1/.... 500 (Internal Server Error)
Sentry Logger [log]: Flushing outcomes...
Sentry Logger [log]: Sending outcomes: [{…}]0: {reason: 'sample_rate', category: 'transaction', quantity: 1}length: 1[[Prototype]]: Array(0)
Fetch finished loading: POST "https://my.domain.com/api/[PROJ_ID]/envelope/?sentry_version=7&sentry_key=[KEY_ID]&sentry_client=sentry.javascript.react%2F9.40.0".

In resume:
Does not work on shared domain name:

  • Application domain: my.domain.com
  • Sentry relay: my.domain.com/sentry/

or

  • Application domain: my.app.domain.com
  • Sentry relay: my.app.domain.com/sentry/

Does work on mixed domain names:

  • Application domain: my.domain.com
  • Sentry relay: my.ingest.domain.com/sentry/

or

  • Application domain: my.app.domain.com
  • Sentry relay: my.domain.com/sentry/

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 12, 2025
  2. Lms24 commented on Aug 13, 2025

    @Lms24
    Member

    This will be fixed by #17393. Thanks for reporting!

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 13, 2025
  4. self-assigned this
    on Aug 13, 2025
  5. rodolfoBee commented on Aug 25, 2025

    @rodolfoBee
    MemberAuthor

    @Lms24 can we have an update on the release of the fix #17393?

  6. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 25, 2025
  7. Lms24 commented on Aug 25, 2025

    @Lms24
    Member

    Hi, apologies for the delay! I just revisited the PR and made a few imporvements as well as fixing some failing tests. We'll ship this fix in the next days.

  8. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 25, 2025
  9. Lms24 commented on Aug 26, 2025

    @Lms24
    Member

    We've just merged the fix but we're facing some issues with CI. So it'll still take some hours to get the release out. Once it is published, another message will be posted in this issue.

  10. github-actions commented on Aug 26, 2025

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #17393, which was included in the 10.6.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions