You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When making request to Yoga with invalid mutlipart headers an error bubbles up all the way to the top and results in a 500,
It looks like when calling multer it throws an error. Could the error be caught inside Yoga and GQL error (with a 200 status code) returned at this point rather than letting the error bubble up all the way?
Server is running on http://localhost:4000/graphql
ERR Error: Multipart: Boundary not found
at new Multipart (/Users/vk/repo/yoga-issue/node_modules/busboy/lib/types/multipart.js:233:13)
at getInstance (/Users/vk/repo/yoga-issue/node_modules/busboy/lib/index.js:33:12)
at module.exports (/Users/vk/repo/yoga-issue/node_modules/busboy/lib/index.js:56:10)
at /Users/vk/repo/yoga-issue/node_modules/@whatwg-node/node-fetch/cjs/Body.js:121:45
at new Promise (<anonymous>)
at Request.formData (/Users/vk/repo/yoga-issue/node_modules/@whatwg-node/node-fetch/cjs/Body.js:120:16)
at parsePOSTMultipartRequest (file:///Users/vk/repo/yoga-issue/node_modules/graphql-yoga/esm/plugins/request-parser/post-multipart.js:10:37)
at handle (file:///Users/vk/repo/yoga-issue/node_modules/graphql-yoga/esm/server.js:311:41)
ERR Error: Multipart: Boundary not found
at new Multipart (/Users/vk/repo/yoga-issue/node_modules/busboy/lib/types/multipart.js:233:13)
at getInstance (/Users/vk/repo/yoga-issue/node_modules/busboy/lib/index.js:33:12)
at module.exports (/Users/vk/repo/yoga-issue/node_modules/busboy/lib/index.js:56:10)
at /Users/vk/repo/yoga-issue/node_modules/@whatwg-node/node-fetch/cjs/Body.js:121:45
at new Promise (<anonymous>)
at Request.formData (/Users/vk/repo/yoga-issue/node_modules/@whatwg-node/node-fetch/cjs/Body.js:120:16)
at parsePOSTMultipartRequest (file:///Users/vk/repo/yoga-issue/node_modules/graphql-yoga/esm/plugins/request-parser/post-multipart.js:10:37)
at handle (file:///Users/vk/repo/yoga-issue/node_modules/graphql-yoga/esm/server.js:311:41)
Expected behavior
As a user I expect Yoga to validate multipart request and if it's malformed in any way return 200 with an error.
Screenshots or Videos
Platform
OS: macOS
NodeJS: v18.18.0
"@envelop/core": "5.0.0"
"express": "4.18.2",
"graphql-yoga": "5.1.1"
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When making request to Yoga with invalid mutlipart headers an error bubbles up all the way to the top and results in a 500,
It looks like when calling multer it throws an error. Could the error be caught inside Yoga and GQL error (with a 200 status code) returned at this point rather than letting the error bubble up all the way?
Your Example Website or App
https://github.com/kudresov/yoga-validation-issue/tree/express
Steps to Reproduce the Bug or Issue
Replicating issue
npm start
Result
You should see an error like this
Expected behavior
As a user I expect Yoga to validate multipart request and if it's malformed in any way return 200 with an error.
Screenshots or Videos
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: