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 why the file key was not found and providing troubleshooting steps for the request mimetype.

Constructor

Signature

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

Parameters

NameTypeDescription
request[Request](../wrappers/request.md?sid=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=flask_wrappers_request),
key: string
) - > null

Parameters

NameTypeDescription
request[Request](../wrappers/request.md?sid=flask_wrappers_request)The incoming Flask request object used to inspect the mimetype and form data for debugging purposes.
keystringThe specific file key that the user attempted to access in the request.files dictionary.