How to handle 302 exception and parse response URL without following redirection?

Highlighted
Five Stars

How to handle 302 exception and parse response URL without following redirection?

Talend throws an exception when an API returns 302 Found. That's the expected response from the API so it's OK. I DON'T want to follow the redirect in this case.

 

 

As is: exception is thrown and the response URL cannot be parsed.

Goal: to parse the response URL and take one parameter value and continue job with it.

 

 

How to parse the URL without getting the exception AND without following any redirect? I can see the documentation that 302 could be followed with a HTTP proxy, but as mentioned there's no need to follow..

 

 

 

Highlighted
Community Manager

Re: How to handle 302 exception and parse response URL without following redirection?

Highlighted
Five Stars

Re: How to handle 302 exception and parse response URL without following redirection?

@hkorhola were you able to resolve this issue?  I'm encountering a similar issue when tRestClient throws an exception for the 303 response.  I also don't need to follow the redirect in this case.  When the response code is 200 then my job correctly extracts the JSON fields from the response.  However, for the 303 response, even though I can see the full response in the log details displayed in studio the job fails because of the exception thrown on the 303 response.  I filed a support case and they logged a bug, but in the meantime I need to find a workaround.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog