I'm using connexion, a python library for REST API's, with a swagger definition. It's working properly for the actual requests, but when there is an error condition, such as validation fails, it returns a response like:
{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "None is not of type 'string'"
}
The title, status and detail all are good and make sense, but is there a way for me to control the type
key's value so that I can provide more helpful information rather than simply having about:blank
in there?
Under the hood, it appears that connexion uses requests and flask, so maybe there is something I can leverage from them?