fix documentation snippet issue in quickstart/error-handling
@@ -184,15 +184,11 @@ Then decorate that function with :func:`Parser.error_handler <webargs.core.Parse
.. code-block:: python
- from webargs import flaskparser
-
- parser = flaskparser.FlaskParser()
-
+ from webargs.flaskparser import parser
class CustomError(Exception):
pass
-
@parser.error_handler
def handle_error(error, req, schema, *, error_status_code, error_headers):
raise CustomError(error.messages)
