node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »


angular-raven Build Status

A Raven.js / Sentry wrapper for Angular.js

How do I add this to my project?

You can download angular-raven by:

<body ng-app="YOUR_APP" ng-controller="MainCtrl">
  <a href="#error" ng-click="logError()">Log Error</a>
<script src=""></script>
<script src=""></script>
  Raven.config('YOUR_PUBLIC_DSN', {
      // Raven settings 
      "id": "SERVER_RENDERED_ID",
      "email": "SERVER_RENDERED_EMAIL"
<script src="app/bower_components/angular-raven/angular-raven.js"></script>
  angular.module('YOUR_APP', [
  .config(function($ravenProvider) {
    // There is a development flag to log errors rather than sending it to Sentry 
  angular.module('controllers', [])
    .controller('MainCtrl', function($scope, $raven) {
      $scope.logError = function() {

Initializing Raven.js outside of Angular allows Raven to track errors when Angular wasn't able to bootstrap correctly.

The community has compiled a list of common ignore rules for common things, like Facebook, Chrome extensions, etc.

Raven.config('YOUR_PUBLIC_DSN', {
  logger: 'javascript',
  ignoreErrors: [
    // Random plugins/extensions 
    // See: html 
    'Can\'t find variable: ZiteReader',
    'jigsaw is not defined',
    'ComboSearch is not defined',
    // Facebook borked 
    // ISP "optimizing" proxy - `Cache-Control: no-transform` seems to reduce this. (thanks @acdha) 
    // See 
    // See 
  ignoreUrls: [
    // Facebook flakiness 
    // Facebook blocked 
    // Woopra flakiness 
    // Chrome extensions 
    // Other plugins 
    /127\.0\.0\.1:4001\/isrunning/i,  // Cacaoweb