def GET(self, subscription_id):
"""
Retrieve a subscription matching the given subscription id
HTTP Success:
200 OK
HTTP Error:
404 Not Found
401 Unauthorized
"""
header('Content-Type', 'application/json')
try:
subscription = get_subscription_by_id(subscription_id)
except SubscriptionNotFound as error:
raise generate_http_error(404, 'SubscriptionNotFound', 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)
return render_json(**subscription)
评论列表
文章目录