2,682 questions
0
votes
1
answer
24
views
All the services return as a undefined in Global Interceptor in NEST JS
I am trying to create a global interceptor in NestJS and call a service inside it. I have followed all the documented steps, but all the services used within the interceptor are still returning as ...
0
votes
0
answers
12
views
Struts 6.3.0.2 - Interceptor only works in default package
I have created an Interceptor and defined it in the default package in my struts.xml. It is working fine in the the default package (extends="struts-default"). I using this action
<...
0
votes
0
answers
39
views
GRPC C++ fail call in an interceptor before server endpoint is reached
I want to fail a grpc call based on a condition, ideally the interceptor returns an http error to the client before the rpc implementation on the server is reached. The interceptor is on the server ...
0
votes
0
answers
22
views
I can't run LogAspect using Castle DynamicProxy
I am using an Interceptors structure created with Castle DynamicProxy in the project and I wrote a LogAspect for logging operations. However, LogAspect is not triggered in any way. I am sharing my ...
1
vote
2
answers
126
views
How to print a full Req body once using LogInterceptor in Flutter?
I need to Log a full requisition Body, one single time on each req that my system does. I'am using StringBuffer, Dio and LogInterceptor.
What happens:
My log is printing the building of the body, not ...
1
vote
2
answers
60
views
How can I not retry on error 400 and just console.log the error?
@Injectable()
export class RetryInterceptor implements HttpInterceptor {
private keycloakService = inject(KeycloakService);
intercept(request: HttpRequest<unknown>, next: HttpHandler): ...
1
vote
0
answers
44
views
JAX-WS interceptor is not being triggerd
The problem is that after adding JAX-WS to my project, specifically to the file that will be generated, I tested the generated file, but nothing related to the interceptor appeared. It seems like I ...
0
votes
0
answers
38
views
Interceptor Logic Not Working Properly | Android
Does anyone know why this piece of code doesn't guarantee that the token is refreshed only once and made ready for subsequent calls (i occasionally get token not valid error) even though I've wrapped ...
1
vote
2
answers
61
views
Using fresh cookies from catch Error in HttpIntercopterFn
I have created an interceptor to ensure that every request sends HttpOnly JWT/refresh tokens. I am attempting to refresh my short-lived JWT by catching a 401 error and asking the server for a refresh. ...
0
votes
1
answer
60
views
How to find entity types in IQueryExpressionInterceptor?
How can I find all the entity types referenced by the Expression passed to IQueryExpressionInterceptor.QueryCompilationStarting? Where in the expression tree should I look for them?
I've tried a ...
0
votes
1
answer
82
views
Angular Interceptor Implementation
so I am trying to implement an interceptor for my little app which is standalone: true, and all I want this interceptor to do is check that if the response from the server comes back with error 401 to ...
0
votes
1
answer
55
views
When the session times out, a double click is required to go to the login page
I use this code. After setting passwordChanged, when I click (first request) then it invalidates the session in authenticationServices.logout(getHttpServletRequest()), and on the next request it goes ...
1
vote
0
answers
107
views
Angular 17 Interceptor Not Adding Bearer Token on Initial Login Request
I'm working on an Angular 17 application where I'm trying to add an Authorization Bearer token to the request headers upon login. However, I'm facing an issue where the HttpInterceptor retrieves null ...
1
vote
1
answer
151
views
how to pass metadata from gRPC function to interceptor
I'm a bit lost; help me figure out this.
Im trying to add some extra data (like User ID) to a context that I will use later in the log interceptor.
here is how my gRPC call looks like
import (
&...
1
vote
0
answers
42
views
There is something wrong when requesting a new token with refresh token in Angular
The first interceptor adds the jwt to the request header.
export const jwtInterceptor: HttpInterceptorFn = (req, next) => {
const authService = inject(AuthService);
const router = inject(Router)...
0
votes
0
answers
113
views
How do I call a rest client from an interceptor?
If the client is not reactive, it returns null. When I make it reactive I notice that it enters the filter, returns to the endpoint and then returns to the filter. What I wanted is for it to resolve ...
0
votes
1
answer
34
views
Fail to get error response while using axios interceptor
error.response is undefined
I'd like to know if it's a problem with my code or server. If the error status is 401, I'll get a new token through refresh token. if its 500 or something, I'll route the ...
-1
votes
1
answer
76
views
How to specify a requestInterceptor with Spring Boot Feign
We need to add a correlation token header (taking value from MDC context) to every outgoing Feign call.
This page describes using interceptors, which sounds like what we need. The problem is that the ...
0
votes
1
answer
66
views
Exclude paths from interceptor in spring boot
I have a simple interceptor that checks the subdomain, and I want to exclude a few paths from it. I followed the spring documentation Documentation and tried multiple solutions that I found here, but ...
2
votes
1
answer
211
views
DBContext pooling isn't working with Interceptors and healthchecks
I had the need to optimze some sql queries with "OPTION (OPTIMIZE FOR UNKNOWN)".
I therefore added a custom Interceptor like this:
public class QueryHintInterceptor : DbCommandInterceptor
{
...
-1
votes
1
answer
166
views
How to capture request body in ClientRequest when implementing ExchangeFilterFunction
I am implementing a class that implements the ExchangeFilterFunction interface in a Spring WebFlux application to intercept and log HTTP requests and responses when using a reactive WebClient.
I am ...
0
votes
0
answers
32
views
How to intercept outgoing Spring WebClient Request from a service during a test
In order to reduce impact produced by some E2E test, I have to modify the body of a REST request during the test.
The actual code follow this logic :
E2E test call endpoint with POST then the service ...
1
vote
1
answer
87
views
Add annotation on all methods of the classes present in a given directory
I have a usecase that I have created one annotation for our clients to onboard to our platform. These annotations when present over method intercept the method call and avoid making the production ...
0
votes
2
answers
141
views
How to Provide Runtime Parameters to a Custom Annotation's Interceptor in a Jakarta EE Project?
I'm working on a Jakarta EE project where I have a custom annotation and an associated interceptor. The annotation is used to execute some logic, and it works as expected as a standalone. However, I ...
0
votes
0
answers
60
views
Adapting RestTemplate Interceptor and HttpComponentsClientHttpRequestFactory for a WebClient in SpringBoot 2.x
I have this custom Interceptor and trying to migrate to Spring Boot 2.7.18.
import org.springframework.http.MediaType;
import org.springframework.http.client.ClientHttpRequestExecution;
import org....
1
vote
0
answers
141
views
Setting JWT tokens in cookies on 401 in Next js 14 (app) and axios
I have been researching and saw that a lot of people have the same problem. While getting 401 from my backend I need to ask for new (JWT) access token if the refresh token is present and resend ...
1
vote
1
answer
100
views
Axios Interceptor to customize header for uuid
import axios, { AxiosInstance } from "axios";
import { v4 as uuidv4 } from 'uuid';
const axiosInstance: AxiosInstance = axios.create({
baseURL: "http://localhost:8080",
...
1
vote
0
answers
292
views
Angular 18: Interceptor Not Working After Upgrade from Angular 16
I am currently using Angular 18 for my application and my application is modular-based. Previously, my application was developed using Angular 16, but I have recently upgraded it to Angular 18. ...
0
votes
2
answers
577
views
Show message from interceptor function Angular 18
Before upgrading to Angular 18 and a function based interceptor, I was using the traditional class based interceptor and was able to throw up alerts on the screen when an error occurred using a simple ...
0
votes
0
answers
29
views
Intercept outgoing NodeJS https request calls in a application and fetch the request body | Replace original request with modified request
My application uses NodeJS https request (https://nodejs.org/api/https.html) to make outgoing calls.
I need to intercept it and first fetch the request body. Once the request is fetched, I'm preparing ...
0
votes
1
answer
346
views
How to redirect to a specified route in Nuxt server api?
I am currently doing a project using Nuxt and I am using the Nuxt server/api folder for all of my external API. What I'm trying to do is that, I want to redirect back to the / page if there are any ...
0
votes
1
answer
69
views
django grpc framework server interceptor does not seem to run properly
I am using djangogrpcframework 0.2.1 and I am trying to write a interceptor to see if a key is present in the request metadata. I also log somethings to see the progress of the interceptor.
from grpc ...
0
votes
0
answers
24
views
Modify Request In Spring Boot Before Controller With HandlerInterceptor
I found some resources about modifying request/request-body in spring boot before controller validation but HandlerInterceptor is not clear.
Link: https://www.baeldung.com/spring-boot-change-request-...
0
votes
0
answers
142
views
Spring cloud stream kafka binder consumer interceptor
I am working on a spring boot application. Below is my application details:
config:
spring:
cloud:
stream:
function:
bindings:
orderEventsConsumer-in-0: order-events-in
...
2
votes
2
answers
2k
views
Angular 18.0.5 not seeing the interceptor
Angular is not aknowledging the interceptor.
So basically I executed
ng generate interceptor JwtInterceptor
and setup set it up to add the token to the header :
import { HttpErrorResponse, ...
-1
votes
1
answer
29
views
How to write an interceptor in nest
How to write an interceptor in nest, use documentation, carry out authentication. An interceptor is a class annotated with the @Injectable() decorator and implements the NestInterceptor interface.
...
1
vote
0
answers
77
views
Interceptor in angular (version 12) is not getting called
Following is my interceptor code,
api.interceptor.ts
import { HttpEvent, HttpHandler,
HttpInterceptor, HttpRequest } from '@angular/common/http';
import { Injectable ...
1
vote
0
answers
29
views
Axios interceptor cause loop on navigating
I use axios interceptor to check if a user is logged in or not when processing a request. If not, I will redirect them to login page. The problem is when user being redirected to login page, they must ...
0
votes
0
answers
35
views
Express Interceptors and Error Filter: Prevent Interceptor from Modifying Error Responses
I am working with Express and have implemented a global error filter (GlobalExceptionFilter) and a response interceptor (ResponseInterceptor). However, I'm encountering an issue where my interceptor ...
0
votes
0
answers
115
views
Is there a way to access the raw payload with a Python gRPC interceptor (server)?
is there anyway in python to get raw payload in gRPC interceptor and metadata,i need to extract signature for metadata and verify signature. in golang can achieve this by adding raw payload in context ...
0
votes
0
answers
26
views
How to pass dynamic data from a class property like "this.someProp" to a NestJS Interceptor
Its fairly simply:
Inside my generic CrudController I have a property:
someProp = "someData" or actually constructor(someProp: string, crudService: CrudService){}
on a POST route for that ...
0
votes
1
answer
157
views
Error: Bad state: The FormData has already been finalized for Dio Interceptor
I am using Dio Interceptor for RefreshToken. However, whenever I make a request to the backend and the token has already expired while I'm using FormData in my request, it returns an error: "...
1
vote
0
answers
406
views
In Ant Design (ng-zorro) "the icon cloud-upload-o does not exist or is not registered" using module federation and an HTTP interceptor
We're using module federation and Angular 16. We load ng-zorro icons in the host application and in the microfrontends, both of which load ng-zorro (v16).
<button *ngIf="primaryButton"...
0
votes
1
answer
52
views
No output from the Interceptor when using InterceptorBinding
I am learning Interceptor Binding using annotations. The version is Java 11, and Jakarta EJB 4. The server is GlassFish 7. There is no deployment descriptor and annotations archive all requirements.
I ...
0
votes
0
answers
48
views
Please make sure that the argument Array at index [0] is available in the CategoryModule context
I am trying to make a nestJs(with GraphQL Code First) Interceptor which modifies the response before sending it to the client. In this interceptor i am trying to replace the field with the appropriate ...
0
votes
0
answers
14
views
nestjs lifecycle problem and problem in request
when i send the req to the nestjs server its reseve the req and i sent the image with the req and i resev the image in interceptore and i make another interceprot to resize the image but this ...
0
votes
0
answers
32
views
Open dialog on session expire when getting 401 error
import axios from "axios";
import store from "../redux/store/store";
import { updateLoaderState } from "../redux/actions/ui-state.action";
import { MESSAGES } from &...
1
vote
1
answer
78
views
How can I show only one alert for multiple deletions in angular?
I have a code like this =>
return next.handle(req).pipe(
map((response: any) => {
if ( req.method !== "GET" && response instanceof HttpResponse && response.status ...
0
votes
1
answer
47
views
Spring Cloud Contract Test Fails due to interceptor preHandle method which sets a field on HttpServletRequest
I have an Spring Boot Interceptor with a preHandle method that does some logic. In the preHandle method, I call my Authentication Service to get the client ID and then I set that client ID on the ...
0
votes
0
answers
60
views
Using a Request scope service in an axios interceptor
I'm not a nest expert.
What I want is that when the application starts, I configure my axios (configureAxios call).
In this method, I configure an axios interceptor. I want all outgoing requests to ...