How to use the raven-js.showReportDialog function in raven-js

To help you get started, we’ve selected a few raven-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flow-typed / flow-typed / definitions / npm / raven-js_v3.17.x / test_raven-js.js View on Github external
eventId: "eventId",
        ddsn: "dsn",
        user: {
          name: "name",
          email: "email"
        }
      });

      // $ExpectError - eventId must be a string
      Raven.showReportDialog({ eventId: 1 });

      // $ExpectError - dsn must be a string
      Raven.showReportDialog({ dsn: 1 });

      // $ExpectError - user name must be a string
      Raven.showReportDialog({
        user: { name: { first: "first", last: "last" } }
      });
    });
  });
github T-Systems-MMS / phonebook / Phonebook.Frontend / src / app / shared / error / error.module.ts View on Github external
public handleError(error: any): void {
    if (error.name === 'HttpErrorResponse') {
      return;
    }

    if (runtimeEnvironment.environment !== Environment.development) {
      // App is in Production
      if (runtimeEnvironment.ravenURL) {
        // Raven enabled
        console.error(error);
        Raven.captureException(error);
        if (JSON.parse(localStorage.getItem('appstate') || '').sendFeedback || false) {
          Raven.showReportDialog();
        }
      } else {
        // Nothing, maybe later an error Dialog
        console.error(error);
      }
    } else {
      // App is in Development
      throw error;
    }
  }
}
github outcobra / outstanding-cobra / frontend / src / app / core / error / raven-error-handler.ts View on Github external
handleError(error: any): void {
        if (environment.production) {
            // In IE, originalError is not always set apparently
            if (error.originalError) {
                Raven.captureException(error.originalError);
            } else {
                Raven.captureException(error);
            }
            Raven.showReportDialog({});
        } else {
            console.error(error);
        }
    }
}
github DefinitelyTyped / DefinitelyTyped / raven-js / raven-js-tests.ts View on Github external
RavenJS.context({tags: { key: "value" }}, throwsError);
RavenJS.context({extra: {planet: {name: 'Earth'}}}, throwsError);

setTimeout(RavenJS.wrap(throwsError), 1000);
RavenJS.wrap({logger: "my.module"}, throwsError)();
RavenJS.wrap({tags: {git_commit: 'c0deb10c4'}}, throwsError)();

RavenJS.setUserContext({
    email: 'matt@example.com',
    id: '123'
});

RavenJS.captureMessage('Broken!');
RavenJS.captureMessage('Broken!', {tags: { key: "value" }});

RavenJS.showReportDialog({
    eventId: 0815,
    dsn:'1337asdf',
    user: {
        name: 'DefenitelyTyped',
        email: 'df@ts.ms'
    }
});

RavenJS.setTagsContext({ key: "value" });

RavenJS.setExtraContext({ foo: "bar" });
github ealgis / ealgis / frontend / src / shared / api / EALGISApiClient.tsx View on Github external
public handleError(error: any, url: string, dispatch: any) {
        Raven.captureException(error)
        Raven.showReportDialog({})

        dispatch(
            sendSnackbarMessage({
                message: `Error from ${url}`,
                action: "Dismiss",
                autoHideDuration: 4000,
                onActionClick: () => {
                    dispatch(iterateSnackbar())
                },
            })
        )
    }
github nusmodifications / nusmods / v3 / src / js / views / errors / ErrorPage.jsx View on Github external
                <button> Raven.showReportDialog({ eventId })}&gt;
                  tell us more about what happened</button>
github nusmodifications / nusmods / v3 / src / js / views / errors / NotFoundPage.jsx View on Github external
          <button> Raven.showReportDialog({ eventId })}&gt;
            do tell us</button>