(cls, exception_handler, event, context, exception)
| 305 | |
| 306 | @classmethod |
| 307 | def _process_exception(cls, exception_handler, event, context, exception): |
| 308 | exception_processed = False |
| 309 | if exception_handler: |
| 310 | try: |
| 311 | handler_function = cls.import_module_and_get_function(exception_handler) |
| 312 | exception_processed = handler_function(exception, event, context) |
| 313 | except Exception as cex: |
| 314 | logger.error(msg="Failed to process exception via custom handler.") |
| 315 | print(cex) |
| 316 | return exception_processed |
| 317 | |
| 318 | def _handle_request_exception(self, event: Dict[str, Any], context: Any, exception: Exception) -> Dict[str, Any]: |
| 319 | """Handle an uncaught exception during request processing, returning a 500 response.""" |
no test coverage detected