How to use the @sentry/types.Severity function in @sentry/types

To help you get started, we’ve selected a few @sentry/types 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 mentos1386 / nest-raven / test / http / method.e2e.spec.ts View on Github external
it(`/GET level`, async () => {
    await request(app.getHttpServer())
    .get('/level')
    .expect(500);

    expect(client.captureException.mock.calls[0][0]).toBeInstanceOf(Error);
    expect(client.captureException.mock.calls[0][2]._level).toEqual(Sentry.Severity.Critical);
  });
github mentos1386 / nest-raven / test / http / method.controller.ts View on Github external
}))
  extra() {
    throw new Error('Something bad happened');
  }

  @Get('fingerprint')
  @UseInterceptors(new RavenInterceptor({
    fingerprint: ['A', 'B'],
  }))
  fingerprint() {
    throw new Error('Something bad happened');
  }

  @Get('level')
  @UseInterceptors(new RavenInterceptor({
    level: Sentry.Severity.Critical,
  }))
  level() {
    throw new Error('Something bad happened');
  }
}