Skip to content

Sentry.captureUserFeedback does not work with exceptions #9327

@alexgleason

Description

@alexgleason

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

7.74.1

Framework Version

18.0.0

Link to Sentry event

https://soapbox-r0.sentry.io/issues/4528591816/events/latest/?project=4505999904931840&query=is%3Aunresolved&referrer=latest-event&stream_index=0

SDK Setup

Sentry.init({
  dsn,
  debug: false,
  enabled: NODE_ENV === 'production',
  integrations: [new Sentry.BrowserTracing()],

  // Filter events.
  // https://docs.sentry.io/platforms/javascript/configuration/filtering/
  ignoreErrors: [
    // Network errors.
    'AxiosError',
    // sw.js couldn't be downloaded.
    'Failed to update a ServiceWorker for scope',
    // Useful for try/catch, useless as a Sentry error.
    'AbortError',
    // localForage error in FireFox private browsing mode (which doesn't support IndexedDB).
    // We only use IndexedDB as a cache, so we can safely ignore the error.
    'No available storage method found',
    // Virtuoso throws these errors, but it is a false-positive.
    // https://github.com/petyosi/react-virtuoso/issues/254
    'ResizeObserver loop completed with undelivered notifications.',
    'ResizeObserver loop limit exceeded',
  ],
  denyUrls: [
    // Browser extensions.
    /extensions\//i,
    /^chrome:\/\//i,
    /^moz-extension:\/\//i,
  ],

  tracesSampleRate: 1.0,
});

Steps to Reproduce

Call Sentry.captureUserFeedback() where the error_id is the ID of an exception event. Eg:

// Note `captureException`! It works when using `captureMessage`.
const eventId = Sentry.captureException(error);

Sentry.captureUserFeedback({
  event_id: eventId,
  comments: 'hello world',
  name: 'test',
  email: 'test@example.com',
});

Expected Result

The feedback is available in the Sentry dashboard for the event.

Actual Result

Sentry responds with a 200. Everything looks okay, but the feedback is nowhere to be found. Oddly enough, it works with Sentry.captureMessage(), just not with Sentry.captureException().

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: reactIssues related to the Sentry React SDK

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions