class DefaultExceptionToProducerResponseConverter implements ExceptionToProducerResponseConverter<Throwable> {

  @Override
  public Response convert(SwaggerInvocation swaggerInvocation, Throwable e) {
    LOGGER.error("invoke failed, invocation={}", swaggerInvocation.getInvocationQualifiedName(), e);
    //not only producer but also consumer
    return Response.failResp(swaggerInvocation.getInvocationType(), e);
  }

}