ErrorHandlerBuilder builder = (ErrorHandlerBuilder)routeContext.getRoute().getErrorHandlerBuilder();
// check if its a ref if so then do a lookup
if (builder instanceof ErrorHandlerBuilderRef) {
// its a reference to a error handler so lookup the reference
ErrorHandlerBuilderRef builderRef = (ErrorHandlerBuilderRef) builder;
String ref = builderRef.getRef();
// only lookup if there was explicit an error handler builder configured
// otherwise its just the "default" that has not explicit been configured
// and if so then we can safely replace that with our transacted error handler
if (ErrorHandlerBuilderRef.isErrorHandlerBuilderConfigured(ref)) {
LOG.debug("Looking up ErrorHandlerBuilder with ref: {}", ref);