errorInterceptor does not intercept very well. Let the hook prevent the following actions.
errorInterceptor does not intercept very well. Let the hook prevent the following actions.

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.

jsdevel/restangular,aychando/restangular,bartzilla/restangular,hansottowirtz/restangular,arabianfoz/restangular,ackimwilliams/restangular,zhengcongzhen/restangular,janeyhjy/restangular,matiomlei/restangular-1,CandyLee198088/restangular,dankahle/restangular,chacbumbum/restangular,idpaterson/restangular,cruiser/restangular,fernandomoraes/restangular,sergiocruz/restangular,dshefchik/restangular,kevinrenskers/restangular,yelmontaser/restangular,rodrigomf24/restangular,mgonto/restangular,hartz89/restangular,Nihaux/restangular,xuwupeng2000/restangular,dokkis/restangular,facingsouth/restangular,Akallabet/restangular,scalp42/restangular,marciocamello/restangular,mrahhal/restangular,duxet/restangular,sesubash/restangular