<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:
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)

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.