Address review comments
This commit is contained in:
parent
eba75494d9
commit
b5db41920f
5 changed files with 16 additions and 16 deletions
|
@ -316,8 +316,7 @@ def request_error(exception=None, **kwargs):
|
|||
message = 'Request error.'
|
||||
if exception:
|
||||
message = exception.message
|
||||
if 'message' in data.keys():
|
||||
message = data.pop('message')
|
||||
message = data.pop('message', message)
|
||||
raise InvalidRequest(message, data)
|
||||
|
||||
|
||||
|
|
|
@ -183,16 +183,20 @@ def swagger_route_data(include_internal=False, compact=False):
|
|||
'type': 'object',
|
||||
'properties': {
|
||||
'status': {
|
||||
'type': 'integer'
|
||||
'type': 'integer',
|
||||
'description': 'Status code of the response.'
|
||||
},
|
||||
'type': {
|
||||
'type': 'string'
|
||||
'type': 'string',
|
||||
'description': 'Reference to the type of the error.'
|
||||
},
|
||||
'detail': {
|
||||
'type': 'string'
|
||||
'type': 'string',
|
||||
'description': 'Details about the specific instance of the error.'
|
||||
},
|
||||
'title': {
|
||||
'type': 'string'
|
||||
'type': 'string',
|
||||
'description': 'Unique error code to identify the type of error.'
|
||||
}
|
||||
},
|
||||
'required': [
|
||||
|
|
|
@ -51,6 +51,5 @@ class Error(ApiResource):
|
|||
""" Get a detailed description of the error """
|
||||
if error_type in ERROR_DESCRIPTION.keys():
|
||||
return error_view(error_type), 200
|
||||
else:
|
||||
raise NotFound()
|
||||
raise NotFound()
|
||||
|
||||
|
|
Reference in a new issue