Tagged: IG, StaticResponseHandler, SwitchFilter
This topic has 1 reply, 1 voice, and was last updated 1 year, 2 months ago by vanamali.
-
AuthorPosts
-
April 7, 2021 at 6:08 pm #28519
vanamali
ParticipantHello Folks,
I have a weird issue going with IG (7.x) where I am trying to trap a 400 response code. Send it to a staticresponse handler with a custom message. The switchfilter is doing its job, but the call to the handler is sent as a request. So, any headers to be tracked as part of the forwarding is not showing up.
{
“name”: “myswitch”,
“type”: “SwitchFilter”,
“config”: {
“onResponse”: [{
“condition”: “${response.status.code == 400}”,
“handler”: “customResponseHandler”
}]
}
}HTTP/1.1 400 xxxx
—
—
—
attributes:^[[34m^[[0;39m[I/O dispatcher 67] ^[[34mINFO ^[[0;39m ^[[1;37mo.f.o.d.c.C.c.customResponseHandler^[[0;39m @***Route** –
— (request) id:a9d52995-cd6e-44b6-9164-b1b7edb17c36-588 —>
Not sure what’s going on? the switchfilter does not contain an entry for request condition.
Given the state in which the forwarding happeing is for a onresponse condition, why response headers are not available. If I try for “${response.headers[‘xxxx’][0]} returns null. same for “${request.headers[‘xxx’][0]} returns value.Any dependencies that I am missing.
-
This topic was modified 1 year, 2 months ago by
vanamali.
April 7, 2021 at 6:10 pm #28520 -
This topic was modified 1 year, 2 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.