Skip to content

Commit 4c13c48

Browse files
committed
bugfix for errorhandler
1 parent 48f7807 commit 4c13c48

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jsonrpc/dispatcher.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ def decorator(f):
7070
def _wrap_method(self, f):
7171
@wraps(f)
7272
def _method(*args, **kwargs):
73-
for hook in self._before_request_hooks:
74-
hook()
73+
try:
74+
for hook in self._before_request_hooks:
75+
hook()
7576

76-
nf = f
77-
for deco in reversed(self._decorators):
78-
nf = deco(nf)
77+
nf = f
78+
for deco in reversed(self._decorators):
79+
nf = deco(nf)
7980

80-
try:
8181
return nf(*args, **kwargs)
8282
except Exception as e:
8383
for E, h in self._error_handler_spec.items():

0 commit comments

Comments
 (0)