mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-27 10:15:10 +00:00
Squashed 'flask-bpmn/' changes from 5edb83f66..6e1411dd1
6e1411dd1 log the exception before returning the response git-subtree-dir: flask-bpmn git-subtree-split: 6e1411dd134955a829bb9f3d59b4af121907cd35
This commit is contained in:
parent
6423633c91
commit
9d0278add0
@ -172,6 +172,7 @@ def set_user_sentry_context() -> None:
|
|||||||
@api_error_blueprint.app_errorhandler(ApiError)
|
@api_error_blueprint.app_errorhandler(ApiError)
|
||||||
def handle_invalid_usage(error: ApiError) -> flask.wrappers.Response:
|
def handle_invalid_usage(error: ApiError) -> flask.wrappers.Response:
|
||||||
"""Handles invalid usage error."""
|
"""Handles invalid usage error."""
|
||||||
|
current_app.logger.exception(error)
|
||||||
return make_response(jsonify(error), error.status_code)
|
return make_response(jsonify(error), error.status_code)
|
||||||
|
|
||||||
|
|
||||||
@ -197,6 +198,8 @@ def handle_internal_server_exception(exception: Exception) -> flask.wrappers.Res
|
|||||||
f"https://sentry.io/{organization_slug}/{project_slug}/events/{id}"
|
f"https://sentry.io/{organization_slug}/{project_slug}/events/{id}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
current_app.logger.exception(exception)
|
||||||
|
|
||||||
api_exception = ApiError(
|
api_exception = ApiError(
|
||||||
error_code="error",
|
error_code="error",
|
||||||
message=f"{exception.__class__.__name__}",
|
message=f"{exception.__class__.__name__}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user