python-swagger+;烧瓶中止返回空错误消息

python-swagger+;烧瓶中止返回空错误消息,python,swagger,Python,Swagger,所以,我尝试在使用SwaggerClient时使用自定义中止消息。使用flask restful中止功能时,我可以在SwiggerUI上看到中止消息。但是当我试图在使用python模块时看到错误消息时,我得到了bravado.exception错误代码。 我尝试使用@namespace.response decorator,我尝试使用“还返回响应”:True,“禁用回退结果”:True,但仍然没有希望。 我很想得到一些帮助/提示等 我的一些代码: _api = Api(_app, version

所以,我尝试在使用SwaggerClient时使用自定义中止消息。使用flask restful中止功能时,我可以在SwiggerUI上看到中止消息。但是当我试图在使用python模块时看到错误消息时,我得到了bravado.exception错误代码。 我尝试使用@namespace.response decorator,我尝试使用
“还返回响应”:True,“禁用回退结果”:True
,但仍然没有希望。 我很想得到一些帮助/提示等

我的一些代码:

_api = Api(_app, version='1.0', title=self.name, description=self.name, errors = errors, )


NAMESPACE = "test"
namespace = _api.namespace(NAMESPACE, description=NAMESPACE)

@namespace.route("/error")
class SystemStatus(Resource):
    @namespace.doc("status")
    # @namespace.response(409, "Missing Parameter")
    def get(self):
        _api.abort(409, "testError")

以及招摇过市客户机的使用:

def testing2(self):
        print("In testing2")
        return self.swagger_client.test.status().response()
错误,例如:
bravado.exception.HTTPConflict:409冲突:响应规范与http状态匹配\u未找到操作(状态)的代码409。为状态代码添加响应规范或使用“默认”响应。


用户界面:

如果您发布一些代码,您可能会得到更多有用的响应。@Moeasal添加到您的请求中尝试以下解决方案: