Compare commits

...

1 Commits

Author SHA1 Message Date
ab8a357137 Added logger output on error 500
Cherry picked and tweaked from
fdec916528
2025-06-06 16:34:32 +01:00
2 changed files with 6 additions and 1 deletions

View File

@@ -8,4 +8,4 @@
"""Metadata for this python module."""
__version__ = "2025.6.6.3"
__version__ = "2025.6.6.4"

View File

@@ -8,6 +8,7 @@
"""invenio module for I-Form theme."""
import traceback
from functools import wraps
from typing import Dict
@@ -121,6 +122,10 @@ def default_error_handler(e: Exception):
# - `e`, the passed-in exception
# to get proxied-to objects: `flask.request._get_current_object()`
msg = f"default_error_handler of invenio-theme-iform captured following error type: {
type(e)
} with message {e} and stack trace {traceback.format_exc()}"
current_app.logger.error(msg)
return render_template(current_app.config["THEME_500_TEMPLATE"]), 500