Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message when loading malformed JSON #361

Open
Rex90 opened this issue Jul 4, 2017 · 0 comments
Open

Error message when loading malformed JSON #361

Rex90 opened this issue Jul 4, 2017 · 0 comments

Comments

@Rex90
Copy link

Rex90 commented Jul 4, 2017

Hi - I am using anuglar loadbar in my app and its brilliant.

I have one issue though, if I ever try to load a malformed json via http request, I get an error message in my log that looks like the below.... the problem is that I have no way of identifying where the error is coming from... which piece of code ran the http request and which file was being loaded... Is there some way to configure angular-loading-bar to give me that info in the error messages? Something to do with the interceptor (i dont really know if it applies)


11:49:09.622 angular.js:14362 SyntaxError: Unexpected token U in JSON at position 0
    at JSON.parse (<anonymous>)
    at fromJson (http://localhost:8080/bower_components/angular/angular.js:1377:14)
    at defaultHttpResponseTransform (http://localhost:8080/bower_components/angular/angular.js:11025:16)
    at http://localhost:8080/bower_components/angular/angular.js:11116:12
    at forEach (http://localhost:8080/bower_components/angular/angular.js:357:20)
    at transformData (http://localhost:8080/bower_components/angular/angular.js:11115:3)
    at transformResponse (http://localhost:8080/bower_components/angular/angular.js:11936:21)
    at processQueue (http://localhost:8080/bower_components/angular/angular.js:16689:37)
    at http://localhost:8080/bower_components/angular/angular.js:16733:27
    at Scope.$eval (http://localhost:8080/bower_components/angular/angular.js:18017:28) Possibly unhandled rejection: {}
(anonymous) @ angular.js:14362
(anonymous) @ angular.js:10859
processChecks @ angular.js:16715
$eval @ angular.js:18017
$digest @ angular.js:17827
$apply @ angular.js:18125
done @ angular.js:12233
completeRequest @ angular.js:12459
requestLoaded @ angular.js:12387
11:49:09.625 angular.js:14362 Broken interceptor detected: Config object not supplied in rejection:
 https://github.com/chieffancypants/angular-loading-bar/pull/50
(anonymous) @ angular.js:14362
responseError @ loading-bar.js:135
processQueue @ angular.js:16689
(anonymous) @ angular.js:16733
$eval @ angular.js:18017
$digest @ angular.js:17827
$apply @ angular.js:18125
done @ angular.js:12233
completeRequest @ angular.js:12459
requestLoaded @ angular.js:12387
11:49:09.684 angular.js:14362 Broken interceptor detected: Config object not supplied in rejection:
 https://github.com/chieffancypants/angular-loading-bar/pull/50
(anonymous) @ angular.js:14362
responseError @ loading-bar.js:135
processQueue @ angular.js:16689
(anonymous) @ angular.js:16733
$eval @ angular.js:18017
$digest @ angular.js:17827
$apply @ angular.js:18125
done @ angular.js:12233
completeRequest @ angular.js:12459
requestLoaded @ angular.js:12387
11:49:09.687 angular.js:14362 Broken interceptor detected: Config object not supplied in rejection:
 https://github.com/chieffancypants/angular-loading-bar/pull/50
(anonymous) @ angular.js:14362
responseError @ loading-bar.js:135
processQueue @ angular.js:16689
(anonymous) @ angular.js:16733
$eval @ angular.js:18017
$digest @ angular.js:17827
$apply @ angular.js:18125
done @ angular.js:12233
completeRequest @ angular.js:12459
requestLoaded @ angular.js:12387
11:49:09.689 angular.js:14362 Broken interceptor detected: Config object not supplied in rejection:
 https://github.com/chieffancypants/angular-loading-bar/pull/50
(anonymous) @ angular.js:14362
responseError @ loading-bar.js:135
processQueue @ angular.js:16689
(anonymous) @ angular.js:16733
$eval @ angular.js:18017
$digest @ angular.js:17827
$apply @ angular.js:18125
done @ angular.js:12233
completeRequest @ angular.js:12459
requestLoaded @ angular.js:12387
11:49:09.701 angular.js:14362 Broken interceptor detected: Config object not supplied in rejection:
 https://github.com/chieffancypants/angular-loading-bar/pull/50
(anonymous) @ angular.js:14362
responseError @ loading-bar.js:135
processQueue @ angular.js:16689
(anonymous) @ angular.js:16733
$eval @ angular.js:18017
$digest @ angular.js:17827
$apply @ angular.js:18125
done @ angular.js:12233
completeRequest @ angular.js:12459
requestLoaded @ angular.js:12387
11:49:09.724 angular.js:14362 Broken interceptor detected: Config object not supplied in rejection:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant