Commit ab7eccda authored by pitchum's avatar pitchum

Return HTTP status 405 instead of 500 + stacktrace + email.

parent 6e290ffe
......@@ -112,6 +112,8 @@ class Resource(MethodView, REST):
def dispatch_request(self, *args, **kwargs):
meth = getattr(self, request.method.lower(), None)
if not meth:
return self.negociated_resp(None, 405, None) # 405 Method not allowed
resp = meth(*args, **kwargs)
if isinstance(resp, Response):
return resp
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment