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

Handle errors in which the server is down #61

Open
hut8 opened this issue Feb 7, 2016 · 0 comments
Open

Handle errors in which the server is down #61

hut8 opened this issue Feb 7, 2016 · 0 comments
Assignees
Labels

Comments

@hut8
Copy link
Member

hut8 commented Feb 7, 2016

When the server is down, the responseError handler is still called. But then rejection.data is null, which causes another error! 😢

    function ConfigureErrorHandler($httpProvider) {
        $httpProvider.interceptors.push(function($q, $rootScope, $log, $injector) {
             return {
                 'responseError': function(rejection) {
                     $log.debug(rejection);
                     $rootScope.errorDescription = rejection.data.error;
@hut8 hut8 added the bug label Feb 7, 2016
@hut8 hut8 self-assigned this Feb 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant