fix(connector/api): check for error handling
A regression was introduced during latest code refactory. A missing check condition was always setting the output result to an empty string.
Fix
@@ -73,11 +73,13 @@ public class ApiProviderReturnPathCustomizer implements ComponentProxyCustomizer
private static Processor statusCodeUpdater(Integer httpResponseCode) {
return exchange -> {
+ if (exchange.getException() != null) {
//making sure we don't return anything
exchange.getIn().setBody("");
if (httpResponseCode != null) {
exchange.getIn().setHeader(Exchange.HTTP_RESPONSE_CODE, httpResponseCode);
}
+ }
};
}
