How prevent Angular Intercept to trigger in certain conditions?

Viewed 41

I have some HTTP calls that MAY displays errors to user in page if something wrong happens. Then I included in my Angular 12 project an "error interceptor" class: enter image description here

After this, ALL errors are intercepted by "ErrorInterceptor". The situation is: my interceptor redirect to error pages. And now if some expected error in my page happens, instead of showing errors to user inside my current page, the user is redirected to error pages. How can I prevent Angular interception in certain conditions? Here is some example:

enter image description here

I want to suppress "step 2" in this example. Is it possible?

0 Answers
Related