summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/restful/hooks.py
blob: c57cbcd404d0b22800b6d3fec6c86ced5cc2e835 (plain)
1
2
3
4
5
6
7
8
9
10
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()))