My question is about `$resource`'s interceptor(responseError). I want to emphasize that the angularjs I based on is `V1.3.6`.

Problem:

```
app.factory('authInterceptor',['$q', '$location', '$log', function($q, $location, $log){
    $log.debug('this is a regular factory with injection');
    return {
        responseError: function(response){
            console.log(response)
            // problem is that I cant check 401 by response.status, 
            // because the response here is AN ERROR OBJECT like `SyntaxError: ...`. Anyway to get the status?
            return $q.reject(response);
        }
    }
}])

```

When I get 401 response, `responseError`'s arguments is AN ERROR OBJECT like `SyntaxError: Unexpected token U` because the reponse from server is plain text `Unathorized` with status `401`.

But I want to get the `response.status`, and do something if it is `401`.

Any help will be appreciated.