Skip to content

Commit 670c8d9

Browse files
committed
Fixed a bug with the angular integration
1 parent 38ad33c commit 670c8d9

11 files changed

+18
-18
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The definition of the word exceptionless is: to be without exception. Exceptionl
1010
## Show me the code! ##
1111

1212
```html
13-
<script src="https://cdn.rawgit.com/exceptionless/Exceptionless.JavaScript/v1.5.0/dist/exceptionless.min.js"></script>
13+
<script src="https://cdn.rawgit.com/exceptionless/Exceptionless.JavaScript/v1.5.1/dist/exceptionless.min.js"></script>
1414
<script>
1515
var client = exceptionless.ExceptionlessClient.default;
1616
client.config.apiKey = 'API_KEY_HERE';
@@ -49,7 +49,7 @@ Use one of the following methods to install Exceptionless.js into your browser a
4949
Add the following script to your page:
5050

5151
```html
52-
<script src="https://cdn.rawgit.com/exceptionless/Exceptionless.JavaScript/v1.5.0/dist/exceptionless.min.js"></script>
52+
<script src="https://cdn.rawgit.com/exceptionless/Exceptionless.JavaScript/v1.5.1/dist/exceptionless.min.js"></script>
5353
```
5454

5555
- **Bower:**

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "exceptionless",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "JavaScript client for Exceptionless",
55
"license": "Apache-2.0",
66
"main": "dist/exceptionless.js",

dist/exceptionless.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.node.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.universal.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.universal.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/integrations/angular.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
angular.module('exceptionless', [])
22
.constant('$ExceptionlessClient', exceptionless.ExceptionlessClient.default)
3-
.factory('exceptionlessHttpInterceptor', ['$q', '$ExceptionlessClient', function ($q, $ExceptionlessClient) {
3+
.factory('exceptionlessHttpInterceptor', ['$location', '$q', '$ExceptionlessClient', function ($location, $q, $ExceptionlessClient) {
44
return {
55
responseError: function responseError(response) {
66
if (response.status === 404) {
@@ -10,8 +10,8 @@ angular.module('exceptionless', [])
1010
var message = "[" + response.status + "] " + (response.data && response.data.Message ? response.data.Message : response.config.url);
1111
$ExceptionlessClient.createUnhandledException(new Error(message), 'errorHttpInterceptor')
1212
.setSource(response.config.url)
13-
.setCode(response.status)
1413
.setProperty('response', response)
14+
.setProperty('referrer', $location.absUrl())
1515
.submit();
1616
}
1717
return $q.reject(response);
@@ -20,10 +20,10 @@ angular.module('exceptionless', [])
2020
}])
2121
.config(['$httpProvider', '$provide', '$ExceptionlessClient', function ($httpProvider, $provide, $ExceptionlessClient) {
2222
$httpProvider.interceptors.push('exceptionlessHttpInterceptor');
23-
$provide.decorator('$exceptionHandler', ['$delegate', function ($delegate) {
23+
$provide.decorator('$exceptionHandler', ['$delegate', '$location', function ($delegate, $location) {
2424
return function (exception, cause) {
2525
$delegate(exception, cause);
26-
$ExceptionlessClient.createUnhandledException(exception, '$exceptionHandler').setMessage(cause).submit();
26+
$ExceptionlessClient.createUnhandledException(exception, '$exceptionHandler').setMessage(cause).setSource($location.absUrl()).submit();
2727
};
2828
}]);
2929
$provide.decorator('$log', ['$delegate', function ($delegate) {

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "exceptionless",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "JavaScript client for Exceptionless",
55
"license": "Apache-2.0",
66
"browser": "dist/exceptionless.js",

src/integrations/angular.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ declare var exceptionless;
44

55
angular.module('exceptionless', [])
66
.constant('$ExceptionlessClient', exceptionless.ExceptionlessClient.default)
7-
.factory('exceptionlessHttpInterceptor', ['$q', '$ExceptionlessClient', ($q, $ExceptionlessClient) => {
7+
.factory('exceptionlessHttpInterceptor', ['$location', '$q', '$ExceptionlessClient', ($location, $q, $ExceptionlessClient) => {
88
return {
99
responseError: function responseError(response) {
1010
if (response.status === 404) {
@@ -13,8 +13,8 @@ angular.module('exceptionless', [])
1313
const message = `[${response.status}] ${(response.data && response.data.Message ? response.data.Message : response.config.url)}`;
1414
$ExceptionlessClient.createUnhandledException(new Error(message), 'errorHttpInterceptor')
1515
.setSource(response.config.url)
16-
.setCode(response.status)
1716
.setProperty('response', response)
17+
.setProperty('referrer', $location.absUrl())
1818
.submit();
1919
}
2020
return $q.reject(response);
@@ -23,10 +23,10 @@ angular.module('exceptionless', [])
2323
}])
2424
.config(['$httpProvider', '$provide', '$ExceptionlessClient', ($httpProvider, $provide, $ExceptionlessClient) => {
2525
$httpProvider.interceptors.push('exceptionlessHttpInterceptor');
26-
$provide.decorator('$exceptionHandler', ['$delegate', ($delegate) => {
26+
$provide.decorator('$exceptionHandler', ['$delegate', '$location', ($delegate, $location) => {
2727
return (exception, cause) => {
2828
$delegate(exception, cause);
29-
$ExceptionlessClient.createUnhandledException(exception, '$exceptionHandler').setMessage(cause).submit();
29+
$ExceptionlessClient.createUnhandledException(exception, '$exceptionHandler').setMessage(cause).setSource($location.absUrl()).submit();
3030
};
3131
}]);
3232
$provide.decorator('$log', ['$delegate', ($delegate) => {

0 commit comments

Comments
 (0)