From be1232ebd59f5f6c5c52c88537269ad2c894a6ed Mon Sep 17 00:00:00 2001 From: Joe Kaufeld Date: Thu, 29 Aug 2024 00:54:25 -0400 Subject: [PATCH] :sparkles: add on_error as a base piece of middleware --- spiderweb/middleware/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spiderweb/middleware/base.py b/spiderweb/middleware/base.py index 4fc5677..0cf3b00 100644 --- a/spiderweb/middleware/base.py +++ b/spiderweb/middleware/base.py @@ -28,3 +28,6 @@ class SpiderwebMiddleware: self, request: Request, response: HttpResponse ) -> HttpResponse | None: pass + + def on_error(self, request: Request, e: Exception) -> HttpResponse | None: + pass \ No newline at end of file