From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/pybind/mgr/restful/hooks.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/pybind/mgr/restful/hooks.py (limited to 'src/pybind/mgr/restful/hooks.py') diff --git a/src/pybind/mgr/restful/hooks.py b/src/pybind/mgr/restful/hooks.py new file mode 100644 index 00000000..d677dcc2 --- /dev/null +++ b/src/pybind/mgr/restful/hooks.py @@ -0,0 +1,11 @@ +from __future__ import absolute_import + +from pecan.hooks import PecanHook + +import traceback + +from . import context + +class ErrorHook(PecanHook): + def on_error(self, stat, exc): + context.instance.log.error(str(traceback.format_exc())) -- cgit v1.2.3