You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/exceptionite/solutions.py
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,7 @@ def get(cls):
53
53
ModelNotFound(),
54
54
DatabaseDriverNotFound(),
55
55
DriverNotFound(),
56
+
MethodNotAllowed(),
56
57
]
57
58
58
59
@@ -396,6 +397,18 @@ def regex(self):
396
397
returnr"^Could not find the '(?P<package>([\w]*))' library"
397
398
398
399
400
+
classMethodNotAllowed:
401
+
deftitle(self):
402
+
return"HTTP Method Not Allowed"
403
+
404
+
defdescription(self):
405
+
return"You tried to make a :method request on this URL but only :allowed_methods methods are allowed. If you want to use this method, update your routes file else use the allowed methods for making the request to this URL."
406
+
407
+
defregex(self):
408
+
returnr"^(?P<method>([\w]*)) method not allowed for this route. Supported methods are: (?P<allowed_methods>(\w+\,?\s?)*)."
409
+
# return r"^(?P<method>([\w+])) method not allowed for this route. Supported methods are: (?P<allowed_methods>(\w,+))."
0 commit comments