{"id":20289991,"url":"https://github.com/mkrawiec/ngx-raven-interceptor","last_synced_at":"2026-05-06T09:37:11.380Z","repository":{"id":57145018,"uuid":"103025652","full_name":"mkrawiec/ngx-raven-interceptor","owner":"mkrawiec","description":"Angular 4.3.0+ Http Error Interceptor for Sentry","archived":false,"fork":false,"pushed_at":"2018-03-11T16:17:33.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T02:37:19.766Z","etag":null,"topics":["angular","angular2","http-client","interceptor","raven","sentry"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkrawiec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-10T11:56:49.000Z","updated_at":"2018-01-22T09:15:25.000Z","dependencies_parsed_at":"2022-09-05T18:41:01.899Z","dependency_job_id":null,"html_url":"https://github.com/mkrawiec/ngx-raven-interceptor","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrawiec%2Fngx-raven-interceptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrawiec%2Fngx-raven-interceptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrawiec%2Fngx-raven-interceptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrawiec%2Fngx-raven-interceptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkrawiec","download_url":"https://codeload.github.com/mkrawiec/ngx-raven-interceptor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787487,"owners_count":20020099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular2","http-client","interceptor","raven","sentry"],"created_at":"2024-11-14T15:05:47.320Z","updated_at":"2026-05-06T09:37:06.355Z","avatar_url":"https://github.com/mkrawiec.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngx-raven-interceptor\nAngular 4.3.0+ Http Error Interceptor for Sentry.\nOnce included, it will log every failed HTTP request from `HttpClient` to Sentry.\n\n### Installation\n\n`npm install --save ngx-raven-interceptor`\n\nMake sure that raven is [installed and configured properly](https://docs.sentry.io/clients/javascript/integrations/angular/) as well as hooked up as `ErrorHandler` in your app.\n\nInclude `RavenInterceptorModule` in root `@NgModule` of your app.\n\n```typescript\nimport { BrowserModule } from '@angular/platform-browser'\nimport { NgModule, ErrorHandler } from '@angular/core'\nimport { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'\n\nimport { AppComponent } from './app.component'\nimport { RavenErrorHandler } from './error-handler'\nimport { RavenInterceptorModule } from 'ngx-raven-interceptor'\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    HttpClientModule,\n    RavenInterceptorModule.forRoot() // HERE\n  ],\n  providers: [\n    { provide: ErrorHandler, useClass: RavenErrorHandler }\n  ],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\n### Configuration\n\nYou can provide config object to the `forRoot()` function to whitelist or blacklist specific error codes from sending Sentry events\n\nFor example to log only 500, 502, 503 error codes:\n\n    RavenInterceptorModule.forRoot({ whitelistCodes: [500, 501, 503] })\n\nOr you can invert the logic and skip only certain error codes:\n\n    RavenInterceptorModule.forRoot({ blacklistCodes: [400] })\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkrawiec%2Fngx-raven-interceptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkrawiec%2Fngx-raven-interceptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkrawiec%2Fngx-raven-interceptor/lists"}