def handle_invalid_usage(error: ServerError) -> Response: # pylint: disable=unused-variable response = jsonify(error.to_dict()) response.status_code = error.status_code return response
def static_proxy(path: str) -> Response: # pylint: disable=unused-variable if static_dir is not None: return send_from_directory(static_dir, path) else: raise ServerError("static_dir not specified", 404)