Replies: 1 comment 2 replies
-
I'm not sure what you mean by tedious, since it's a literally a four second thing to copy and paste. I'd also question why you'd be cutting and pasting it so many times, since if you build channels that are multitenant capable, you simply don't have to do that. Firstly, in order for a response transformer to always fire its data type must be set to raw. Typically, you then look at the http status code and proceed accordingly for your use case. That includes possibly requeuing the message and/or eventually setting the message to an error. It also means you need to specifically parse the response body. You could use a global post processor, but I suspect you might want to specifically handle errors in different ways based on what end point was called. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
One of my integrations destination API returns error messages that requires some digging. I have used following structure in destinations response transformer:
if(msg.hasOwnProperty("error")){
var customError = {
"errorType": "Client",
"Guid": $('clientGuid'),
"error": msg
}
router.routeMessageByChannelId('example', JSON.stringify(customError));
}
I am wondering if I could use some postprocessor script or something to route error messages to channel I want since it is bit tedious to copy paste in every single destination's response transformer. Something to affect whole channel would be great.
Also I get errors as HTTP Sender error, are these destination connector errors or what?
Beta Was this translation helpful? Give feedback.
All reactions