restangular
restangular copied to clipboard
Ability to have multiple SetErrorInterceptors
I have multiple modules and each one might handle a different status code like 401 or 409. Would it be possible to support multiple error interceptors? https://github.com/mgonto/restangular/issues/488
Maybe it runs all of them and stops when one of them is handled.
I've just got the same issue. That would be very good.
This is already implemented and unit tests are passing, what's the issue you are having (code samples plz) ?
See those lines https://github.com/mgonto/restangular/blob/master/test/restangularSpec.js#L183-L211
I had multiple interceptors setup in different modules and the ordering of them really messed up things. It's been a while (I reverted the code a while ago...), but basically I always wanted them all to run, not stop after the first one returned a result.
@niemyjski Any update? Is this still an issue?
Yes I do think so. I haven't tried for a long while as there hasn't been any updates to this lib
Okay, would you mind providing a live example on Plunkr? This seems like something that should be fixed if it is an issue