Skip to content

Unable to integrate with an AngularJS app #1185

@mchapman

Description

@mchapman

Not sure if this is a bug or incomplete documentation, but I am unable to resolve it having followed all the suggestions I can find here or on the forums. Unfortunately the app is large, so providing a minimal demo is impractical.

Currently like in this example I am getting reports from Raven.captureException() but actual errors are not getting through to sentry - here is an example:

raven.js:55 Error: sentry - this is for you 2
    at Object.<anonymous> (client-calendar.js:9)
    at Object.invoke (angular.js:5003)
    at $controllerInit (angular.js:10866)
    at nodeLinkFn (angular.js:9746)
    at angular.js:10154
    at processQueue (angular.js:16832)
    at angular.js:16876
    at Scope.$digest (angular.js:17971)
    at Scope.$apply (angular.js:18269)
    at done (angular.js:12387)
    at completeRequest (angular.js:12613)
    at XMLHttpRequest.requestLoaded (angular.js:12541)
    at XMLHttpRequest.wrapped (raven.js:418)

The angular plugin is loaded as follows:

<script type="text/javascript">
  Raven
    .config('https://xxxxxxxxxxxxxxxxxxxxxxx@sentry.io/257991', {
      shouldSendCallback: function () {
        console.log('caught error: yeah');
        return true;
      },
      dataCallback: function (data) {
        console.log('caught error:', data);
        return data;
      }
    })
    .addPlugin(Raven.Plugins.Angular)
    .install();
</script>

Neither of the callback functions are called by a thrown exception, but both are called by Raven.captureException.

Raven-js 3.2.1, Chrome 63, Ubuntu 16.04
Not CDN
Hosted Sentry

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions