09-05-2017 05:49 PM
I have a triggered SnapLogic REST API task, with a pipeline that calls a separate vendor REST API. I want to catch any errors from the vendor API so I can return them back in my SnapLogic API response. If I do though, then the error is considered handled and the HTTP response code back to my requester indicates success. If I don’t handle the error, then the pipeline will fail and provide back a generic failure HTTP response code, but without any of the details from the vendor response.
Is it possible to catch/handle the vendor API error, with a successful pipeline execution, but somehow manipulate the SnapLogic HTTP response code with an error code?
09-06-2017 06:17 AM
At this time HTTP response codes cannot be manipulated using Triggered Tasks.
Only ULTRA tasks can be programmed to return different HTTP response codes.
09-06-2017 06:41 AM
Oh okay… ☹️ Thanks for the information.
10-12-2017 06:13 AM
I think the post
just showing how we can manipulate the response body with different error code.(though the response Header is still with code 200)
But, as the questions asked, and same here, how can we change the response Header status code?
Thanks
10-12-2017 11:27 AM
Do you have an Ultra Environment to verify?
Here is a screenshot from my ultra test response in postman. It is certainly possible to put a different status codes in the header response.