Skip to content

Commit a78ab27

Browse files
models: Update error message to reference combined MIME types
- Changed the error message to correctly list `combined_allowed_mime_types` instead of `allowed_mime_types` for improved clarity and accuracy during validation. Assisted-by: Codex
1 parent 5e18a2d commit a78ab27

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/pdfrest/models/_internal.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,10 @@ def allowed_mime_types_validator(
189189
_ = allowed_mime_types_validator(item)
190190
return value
191191
if value.type not in combined_allowed_mime_types:
192-
msg = error_msg or f"The file type must be one of: {allowed_mime_types}"
192+
msg = (
193+
error_msg
194+
or f"The file type must be one of: {combined_allowed_mime_types}"
195+
)
193196
raise ValueError(msg)
194197
return value
195198

0 commit comments

Comments
 (0)