How to automatically redirect access denied requests in tRestRequest
I've created a web service that I'm running in the Talend Open Studio ESB Runtime environment. I used the tRestrequest component and set the "Use Authentication" to Basic HTTP. Everything is working well. What I'm trying to do is catch the requests that are denied access (http status code: 403) and automatically redirect them to a default URL. Is there a way of doing this? - ESB runtime configuration - catch tRestRequest "rejects" and send a response using tRestResponse
Well that was confusing, you talking about redirects but posting some 404 examples...
Now, as I said, returning Location alongside the response seems wrong to me so please try to return some non standard custom header,
example "MyHeader" - this will help to see if Jetty is blocking Location when body is also returned or not.
If "MyHeader" is not returned - please open a TESB issue that a Wrong Call handler loses custom headers.
I have tested it without the Location in the header. Any custom headers that are sent using the WrongCall flow are lost. Even if the status code is 200.
I'll opened a bug:
TESB-17054.