Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Error message when loading malformed JSON #361

Open

Description

@Rex90

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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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