โ05-20-2022 12:13 AM
Hello,
So I created an API specification with these error responses.
โ400โ:
description: Bad request. ID must be an integer
โ401โ:
description: Authorization information is missing or invalid
headers: {}
content: {}
โ404โ:
description: Not found
โ500โ:
description: Interal server error (500)
When I uploaded the spec into snaplogic and changed the pipeline I want it to fetch data from SQL server select with given ID. I want to reroute the error when the ID is not found.
But when I do that I still get on the API call the Server error 500 form the snap itself of snaplogic and not from the reroute or from the specification defined error response
Does someone know why it does not reroute the error to my custom error view or the response code from my api specification
Solved! Go to Solution.
โ05-20-2022 05:39 AM
From the error you posted, the Map data snap is looking for $ID but $ID does not exist in the document stream, check your input doc values
โ05-20-2022 05:39 AM
From the error you posted, the Map data snap is looking for $ID but $ID does not exist in the document stream, check your input doc values
โ05-22-2022 10:06 PM
Hi jcornelius, Yeah I saw I forget to change that but there was also something else. Iโm now investigating it and if I donโt find it I will post the correct topic. Thanks for the info.
โ05-20-2022 05:53 AM
I agree with @jcornelius, The snap with label โMap dataโ is failing because itโs not receiving the ID field. Basing on your explanation, the ID field should be in the โoriginalโ object, so you should map $original.ID
โ05-20-2022 06:36 AM
JFYI to trap error I used the $statusCode