mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-22 14:38:11 +00:00
avoid notifying sentry on standard 405 method not allowed
This commit is contained in:
parent
52b59819cb
commit
76478570ec
@ -27,6 +27,7 @@ from spiffworkflow_backend.services.authentication_service import TokenNotProvid
|
||||
from spiffworkflow_backend.services.authentication_service import UserNotLoggedInError
|
||||
from spiffworkflow_backend.services.task_service import TaskModelError
|
||||
from spiffworkflow_backend.services.task_service import TaskService
|
||||
from werkzeug.exceptions import MethodNotAllowed
|
||||
|
||||
api_error_blueprint = Blueprint("api_error_blueprint", __name__)
|
||||
|
||||
@ -247,6 +248,11 @@ def should_notify_sentry(exception: Exception) -> bool:
|
||||
return False
|
||||
if isinstance(exception, NotAuthorizedError):
|
||||
return False
|
||||
|
||||
# like a 404, 405 Method Not Allowed: The method is not allowed for the requested URL
|
||||
if isinstance(exception, MethodNotAllowed):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user