protected String createErrorMessage(ApiRequest request, Throwable error) {
        if (error.getMessage() == null) {
            return error.getClass().getCanonicalName() + " error occurred with no message. Refer to logs.";
        }
        return error.getMessage();
    }
@see io.apiman.gateway.engine.IPolicyErrorWriter#write(io.apiman.gateway.engine.beans.ApiRequest, java.lang.Throwable, io.apiman.gateway.engine.IApiClientResponse)
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/DefaultPolicyErrorWriter.java