893 questions
2
votes
1
answer
117
views
Does the httpResource have an HttpContext?
httpResource got released as an experimental feature in Angular 19.2. The httpResource uses the HttpClient under the hood. So I was hoping, I would be able to pass all the options I could pass to the ...
1
vote
0
answers
135
views
Angular HttpClient interceptor: Error 429 returns status 0 instead of 429
I am working with an Angular HTTP interceptor and handling various error status codes. However, I have an issue with handling the 429 (Too Many Requests) error code. While the backend correctly ...
1
vote
1
answer
51
views
Functional style interceptors - How to provide them with dependencies
Imagine the situation where you provide any lib to client. Simple scenario, spinner interceptor which needs spinner service.
In old way it was possible to:
providers: [
{
provide: ...
2
votes
1
answer
105
views
Angular | Why catchError does't catch 401 error?
Listen, I'll explain how it all happens.
I'm making a refresh system for a jwt token. It's a standard thing. I configured exactly two systems: guards and interceptors. That's why I'm sure people will ...
1
vote
1
answer
77
views
Angular request duplicate if error is throw
I have a weird behavior with my requests. If the request throw an error, I automatically get a second one launched
Here is an example of my request :
this.http.post(environment['url'] + '/ws/verifier/...
0
votes
2
answers
103
views
"expression has changed after it was checked" error despite having the right setup
I'm facing the error expression has changed after it was checked. I know, that this check runs only in dev mode (runs twice) and that I won't have the error message in prod. But I want to know why I ...
0
votes
0
answers
65
views
Angular Interceptor repeating every request 3 times
I have an interceptor for refreshing an access token, when it doesn't refresh, everything's all good, but when it does, the unfortunate request that happened to pass through it when it decided to ...
0
votes
1
answer
38
views
Angular interceptor stopping all http requests
I have an interceptor that is supposed to refresh an access token if it's expired and continue the request with the new token, but its just looping a lot (not infinitely, something is stopping it ...
1
vote
1
answer
39
views
Angular 17: What use to to fetch data at the app start moment?
there is an issue.
I have Angular 17 app.
There is a need to get a user data by http request as to keep it in localStorage and use everywhere.
The request should be send once only and as earlier as ...
0
votes
0
answers
58
views
switchMap is not executing its code in Http Interceptor
I am facing an issue with the switchMap in interceptor.
But in angular service it works fine. unable to find the reason why switchMap is not executing its code.
Need help please.
getAccessToken
...
0
votes
1
answer
92
views
Calling api request inside an interceptor for jwt refresh token going to an infinite loop
I am trying to implement the the refresh jwt token mechanism in an interceptor.
I am following the accepted answer way in this post
Angular - Waiting for refresh token function to finish before ...
4
votes
1
answer
388
views
How to use provideHttpClient with route-specific interceptors in Angular?
I'm trying to set up provideHttpClient in Angular v19 to use route-specific interceptors, but I'm encountering an issue where no requests are intercepted.
My Setup:
I have a default ApplicationConfig ...
1
vote
1
answer
211
views
How to test an Angular interceptor with a retry strategy?
This is a simplified version of my Angular 18 error interceptor. It will retry requests that produced an error to make sure it was not a fluke (please don't ask!). This works, however I am running ...
1
vote
1
answer
50
views
Angular Interceptor - re-execute the same HTTP Interceptor after a catch
I'm looking for a solution to re-execute the same HTTP query after a catch is completed.
For instance, as per below, I would like to re-execute the same call as the catch hanlded properly the re-...
0
votes
1
answer
39
views
Angular Interceptor - retrieve Graphql query or mutation name
Good morning everyone,
I would need your help to retrieve the query or mutation name within the interceptor which is working fine.
import { HttpContextToken, HttpInterceptorFn } from '@angular/common/...