From 071bc234119776961f026670f0675271c9ccd856 Mon Sep 17 00:00:00 2001 From: Yun Xu Date: Sat, 10 Jun 2017 09:42:48 -0700 Subject: [PATCH] also should handle InvalidUsage exception --- sanic/router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanic/router.py b/sanic/router.py index f379b095..691f1388 100644 --- a/sanic/router.py +++ b/sanic/router.py @@ -353,7 +353,7 @@ class Router: """ try: handler = self.get(request)[0] - except NotFound: + except (NotFound, InvalidUsage): return False if (hasattr(handler, 'view_class') and hasattr(handler.view_class, request.method.lower())):