mgonto/restangular — pull request #209 by ctrix (2013-07-29 11:05:45+00:00)
Title: errorInterceptor does not intercept very well. 

Setting an errorInterceptor function does not prevent the normal execution of the flow.
Basically there is no way to prevent the data to reach the normal hooks.

With this patch, which is backward compatible and should not introduce any regression, when tie errorInterceptor returns false (instead of the traditional response) the response does not reach the following hooks.

As an example, if the API returns a 403 Unauthorized response, i cannot have a single hook to redirect the user to the login page.
With this patch i could intercept every call and prevent the normal flow execution.