|
@@ -310,9 +310,15 @@ class ExceptionHandlerControllerWrapper(ControllerWrapper):
|
310
|
310
|
http_code: HTTPStatus=HTTPStatus.INTERNAL_SERVER_ERROR,
|
311
|
311
|
) -> None:
|
312
|
312
|
self.handled_exception_class = handled_exception_class
|
313
|
|
- self.context = context
|
|
313
|
+ self._context = context
|
314
|
314
|
self.http_code = http_code
|
315
|
315
|
|
|
316
|
+ @property
|
|
317
|
+ def context(self) -> ContextInterface:
|
|
318
|
+ if callable(self._context):
|
|
319
|
+ return self._context()
|
|
320
|
+ return self._context
|
|
321
|
+
|
316
|
322
|
def _execute_wrapped_function(
|
317
|
323
|
self,
|
318
|
324
|
func,
|