def GET(self):
"""
Retrieve all exceptions.
HTTP Success:
200 OK
HTTP Error:
404 Not Found
500 Internal Error
"""
header('Content-Type', 'application/x-json-stream')
try:
for exception in list_exceptions():
yield dumps(exception, cls=APIEncoder) + '\n'
except LifetimeExceptionNotFound as error:
raise generate_http_error(404, 'LifetimeExceptionNotFound', error.args[0][0])
except RucioException as error:
raise generate_http_error(500, error.__class__.__name__, error.args[0])
except Exception as error:
raise InternalError(error)
评论列表
文章目录