Possibly unhandled rejection in Angular 1.6
This has been fixed with fix($q): Add traceback to unhandled promise rejections -- Commit 316f60f and the fix is included in the v1.6.1 release.
First option is simply to hide an error with disablinconfiguring errorOnUnhandledRejections
in $qProvider configuratio as suggested Cengkuru Michael:
app.config(['$qProvider', function ($qProvider) { $qProvider.errorOnUnhandledRejections(false);}]);
BUT this will only switch off logging. The error itself will remain
The better solution in this case will be - handling a rejection with .catch()
method:
service.doSomething() .then(function (response) {}) .catch(function (err) {});
Useful Links:
I fixed the same problem with version 1.6.1 by upgrading angular-ui-router to 0.3.2.