<unknown> issue title

Hello, I’m trying to create a custom issue where I want to set its title, description and some additional data. So far I was able to only set the additional data, which is a JS object.

Here is a simplified version of the current code:
Sentry.init({
dsn: ‘my sentry dsn’,
integrations: [new Integrations.BrowserTracing()],
tracesSampleRate: 1.0,
environment: process.env.GATSBY_ENV,
sendDefaultPii: true,
});

export const dispatchIssue = ({ name, message, data }) => {
  const sentryError = new Error()
  sentryError.name = name
  sentryError.message = message
  Sentry.withScope((scope: Scope) => {
    scope.setExtra('error', data)
    Sentry.captureException(sentryError)
  })
}

When this code executes, what I get on sentry is an issue with ‘unknown’ title. How can I fix it?

The issue was not related to sentry, so please ignore this question.

@renanfilipe how did you tackle this? I have the same issue/question, namely trying to set a custom title/message and after it to send the error.

1 Like