From 7d4dfec1bd88b1dce096301451f2c527afa9a3e7 Mon Sep 17 00:00:00 2001 From: Blake Niemyjski Date: Thu, 21 Apr 2016 16:02:45 -0500 Subject: [PATCH 1/2] Improved stacking for angular errors. --- src/integrations/angular.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/integrations/angular.ts b/src/integrations/angular.ts index 06d71230..3f409363 100644 --- a/src/integrations/angular.ts +++ b/src/integrations/angular.ts @@ -10,7 +10,9 @@ angular.module('exceptionless', []) if (rejection.status === 404) { $ExceptionlessClient.submitNotFound(rejection.config.url); } else if (rejection.status !== 401) { - $ExceptionlessClient.createUnhandledException(new Error(`[${rejection.status}] ${rejection.config.url}`), 'errorHttpInterceptor') + let message = `[${rejection.status}] ${(rejection.data && rejection.data.Message ? rejection.data.Message : rejection.config.url)}`; + $ExceptionlessClient.createUnhandledException(new Error(message), 'errorHttpInterceptor') + .setManualStackingInfo({ Status: rejection.status, ExceptionType: 'Error', Path: rejection.config.method + ' ' + rejection.config.url }) .setSource(rejection.config.url) .setProperty('request', rejection.config) .submit(); From 176075d53fd81fc4012abea740fdf44c4915c53d Mon Sep 17 00:00:00 2001 From: Blake Niemyjski Date: Thu, 5 May 2016 11:47:56 -0500 Subject: [PATCH 2/2] Updated dist folder --- dist/integrations/angular.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dist/integrations/angular.js b/dist/integrations/angular.js index c12acb28..829cc5a5 100644 --- a/dist/integrations/angular.js +++ b/dist/integrations/angular.js @@ -7,7 +7,9 @@ angular.module('exceptionless', []) $ExceptionlessClient.submitNotFound(rejection.config.url); } else if (rejection.status !== 401) { - $ExceptionlessClient.createUnhandledException(new Error("[" + rejection.status + "] " + rejection.config.url), 'errorHttpInterceptor') + var message = "[" + rejection.status + "] " + (rejection.data && rejection.data.Message ? rejection.data.Message : rejection.config.url); + $ExceptionlessClient.createUnhandledException(new Error(message), 'errorHttpInterceptor') + .setManualStackingInfo({ Status: rejection.status, ExceptionType: 'Error', Path: rejection.config.method + ' ' + rejection.config.url }) .setSource(rejection.config.url) .setProperty('request', rejection.config) .submit();