From 496803044081b83f27f3a6e0b5cba42640f4bb32 Mon Sep 17 00:00:00 2001 From: Hepheir-ZenBook Date: Mon, 30 Aug 2021 11:50:40 +0900 Subject: [PATCH] Add suggestion for resolving error caused by endpoint overlapping --- src/flask/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/flask/app.py b/src/flask/app.py index 5179305a..9ef8e520 100644 --- a/src/flask/app.py +++ b/src/flask/app.py @@ -1093,7 +1093,9 @@ class Flask(Scaffold): if old_func is not None and old_func != view_func: raise AssertionError( "View function mapping is overwriting an existing" - f" endpoint function: {endpoint}" + f" endpoint function: {endpoint}.\n" + "Use 'route(... , endpoint=\"other_name\")' to" + " specify a different name." ) self.view_functions[endpoint] = view_func