aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/base_route.py
diff options
context:
space:
mode:
Diffstat (limited to 'pysite/base_route.py')
-rw-r--r--pysite/base_route.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pysite/base_route.py b/pysite/base_route.py
index f389b56e..4e1a63a7 100644
--- a/pysite/base_route.py
+++ b/pysite/base_route.py
@@ -86,11 +86,12 @@ class APIView(RouteView):
... return self.error(ErrorCodes.unknown_route)
"""
- def error(self, error_code: ErrorCodes) -> Response:
+ def error(self, error_code: ErrorCodes, error_info: str = "") -> Response:
"""
Generate a JSON response for you to return from your handler, for a specific type of API error
:param error_code: The type of error to generate a response for - see `constants.ErrorCodes` for more
+ :param error_info: An optional message with more information about the error.
:return: A Flask Response object that you can return from your handler
"""