-
-
Notifications
You must be signed in to change notification settings - Fork 398
Open
Description
Description
When clients send FormData
with an incorrect Content-Type
header (e.g., application/json
instead of multipart/form-data
), the parser should return descriptive errors instead of crashing.
Fix draft
Related PR: #5425
Issues that still require further research
This debug message appears despite the MultipartError being correctly caught and returned by the test. The test passes successfully, but the log might be confusing during debugging.
timestamp=2025-08-23T08:51:42.319Z level=DEBUG fiber=#123 message="Fiber terminated with an unhandled error" cause="MultipartError: Parse
at convertError (/Workspace/effect/packages/platform-node-shared/src/internal/multipart.ts:139:14)
Out of scope
Different error handling behavior: HttpApiSchema.MultipartStream
and HttpApiSchema.Multipart
handle errors differently:
Multipart
errors are encoded asHttpApiDecodeError
by defaultMultipartStream
returnsMultipartError
directly and requires manual error declaration
I am not sure if this is the expected behavior, maybe this should be a separate issue.
Metadata
Metadata
Assignees
Labels
No labels