Address review comments

This commit is contained in:
Evan Cordell 2016-04-11 16:34:40 -04:00
parent eba75494d9
commit b5db41920f
5 changed files with 16 additions and 16 deletions

View file

@ -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)

View file

@ -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': [

View file

@ -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()