@staticmethod<EOL><INDENT>def wrap_errorhandler(app):<DEDENT>
try:<EOL><INDENT>existing_handler = app.error_handler_spec[None][<NUM_LIT>][NotFound]<EOL><DEDENT>except (KeyError, TypeError):<EOL><INDENT>existing_handler = None<EOL><DEDENT>if existing_handler:<EOL><INDENT>app.error_handler_spec[None][<NUM_LIT>][NotFound] =lambda error: handle_not_found(error, wrapped=existing_handler)<EOL><DEDENT>else:<EOL><INDENT>app.error_handler_spec.setdefault(None, {}).setdefault(<NUM_LIT>, {})<EOL>app.error_handler_spec[None][<NUM_LIT>][NotFound] = handle_not_found<EOL><DEDENT>
Wrap error handler.

        :param app: The Flask application.