Skip to content

duplicate react error #1617

Closed
Closed
@markstory

Description

@markstory

From @nightnei on October 4, 2018 15:47

I use componentDidCatch to send error, like in the new documentation. But I receive 2 errors: one is from componentDidCatch and another is sent from somewhere another place. Can I disable autosend errors?

componentDidCatch(error, errorInfo) {
      this.setState({ error });
      Sentry.configureScope(scope => {
        Object.keys(errorInfo).forEach(key => {
          scope.setExtra(key, errorInfo[key]);
        });
      });
      Sentry.captureException(error);
}

screenshot 2018-10-04 18 45 57

Copied from original issue: getsentry/sentry#10021

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions