Skip to main content

DebugFilesKeyError

Raised from request.files during debugging. The idea is that it can provide a better error message than just a generic KeyError/BadRequest.

Attributes

AttributeTypeDescription
msgstringThe detailed error message explaining the missing file key and suggesting potential fixes like setting the correct form enctype.

Constructor

Signature

def DebugFilesKeyError(
request: [Request](../wrappers/request.md?sid=src_flask_wrappers_request),
key: string
) - > None

Parameters

NameTypeDescription
request[Request](../wrappers/request.md?sid=src_flask_wrappers_request)The request object that triggered the error.
keystringThe key that was not found in request.files.

Signature

def DebugFilesKeyError(
request: [Request](../wrappers/request.md?sid=src_flask_wrappers_request),
key: str
) - > null

Parameters

NameTypeDescription
request[Request](../wrappers/request.md?sid=src_flask_wrappers_request)The incoming Flask request object used to inspect the mimetype and form data for debugging.
keystrThe specific file key that was missing from the request.files dictionary.