diff options
-rw-r--r-- | gn3/errors.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gn3/errors.py b/gn3/errors.py index 7a9d0be..1833bf6 100644 --- a/gn3/errors.py +++ b/gn3/errors.py @@ -98,7 +98,9 @@ def handle_generic(exc: Exception) -> Response: current_app.logger.error(exc) resp = jsonify({ "error": type(exc).__name__, - "error_description": exc.args[0], + "error_description": ( + exc.args[0] if bool(exc.args) else "Generic Exception"), + "trace": traceback.format_exc() }) resp.status_code = 500 return resp |