@Override
    public PolicyFailure createFailure(PolicyFailureType type, int failureCode, String message) {
        PolicyFailure failure = GatewayThreadContext.getPolicyFailure();
        failure.setFailureCode(failureCode);
        failure.setMessage(message);
        failure.setType(type);
//        failure.setResponseCode(500);
        return failure;
    }
@see io.apiman.gateway.engine.components.IPolicyFailureFactoryComponent#createFailure(io.apiman.gateway.engine.beans.PolicyFailureType, int, java.lang.String)
gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/PolicyFailureFactoryComponent.java