How to avoid 204 error message in tRest ?

One Star

How to avoid 204 error message in tRest ?

I'm using tRest component to update data in an API. This API returns a 204 code with no content. tRest component has a ERROR behaviour althought that data are correctly updated...
  
I would like to consider this 204 as a normal behaviour. is it possible ?
Community Manager

Re: How to avoid 204 error message in tRest ?

Hi
The error code is defined and returned from rest API, you can change it to another value after tRest, for example:
tRest--main--tMap--main....
on tMap:
row1.ERROR_CODE==204?another value:row1.ERROR_CODE
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: How to avoid 204 error message in tRest ?

thank you for reply Shong
but tRest doesn't allow to go futher : so i cannot change it. The "normal" response from API is "no content"...
  


Thirteen Stars

Re: How to avoid 204 error message in tRest ?

Uncheck checkbox - die on error if not already done
Dose it work for any of request, or always return error?
-----------
One Star

Re: How to avoid 204 error message in tRest ?

vapukov,
I do not have any "die on error" checkbox in tRest component. Do you ?
Thirteen Stars

Re: How to avoid 204 error message in tRest ?

I'm use tRESTClient - it has (sorry, I use tREST long time ago, and just automatically - any api == tRESTClient)
try test it, historically it was not in Studio, but now it present
-----------
One Star

Re: How to avoid 204 error message in tRest ?

Ok i migrate to tRestClient. It just work on main flow instead of iterate isn'it ?
Thirteen Stars

Re: How to avoid 204 error message in tRest ?

yes, it work on main flow, I use tFlowToIterate -> tJavaFlex (empty, just as connector) -> tRESTClient
-----------
One Star

Re: How to avoid 204 error message in tRest ?

Thanks vapukov
I'll use tRestClient.
Bye