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
/Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/whatwg-mimetype/lib/mime-type.js:15
throw new Error(`Could not parse MIME type string "${string}"`);
^
Error: Could not parse MIME type string "undefined"
at new MIMEType (/Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/whatwg-mimetype/lib/mime-type.js:15:13)
at parseMIMEHeader (/Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/@stoplight/prism-http/dist/validator/validators/headers.js:9:22)
at /Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/@stoplight/prism-http/dist/validator/index.js:27:41
at /Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/fp-ts/lib/Either.js:66:101
at /Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/fp-ts/lib/function.js:366:46
at pipe (/Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/fp-ts/lib/function.js:305:23)
at validateInputBody (/Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/@stoplight/prism-http/dist/validator/index.js:24:87)
at /Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/@stoplight/prism-http/dist/validator/index.js:56:142
at /Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/fp-ts/lib/Either.js:844:60
at pipe (/Users/robert/.npm/_npx/61be57b7fb4720a9/node_modules/fp-ts/lib/function.js:303:23)
Expected Behavior
I would expect the mock server to return an error response instead of crashing.
Possible Workaround/Solution
Workaround in my case is to just fix the mime type. I'm mainly just opening this issue as it'd be great for Prism to be more crash-resistant!
Steps to Reproduce
Sorry I don't have a full reproduction, hopefully the aforementioned endpoint definition is helpful.
Environment
Version used: v5.11.0
Environment name and version (e.g. Chrome 39, node.js 5.4): nodejs v21
Operating System and version (desktop or mobile): MacOS
Link to your environment/workspace/project: N/A
The text was updated successfully, but these errors were encountered:
Current Behavior
The mock server crashes when a request comes in for an endpoint that looks like this
With this error
Expected Behavior
I would expect the mock server to return an error response instead of crashing.
Possible Workaround/Solution
Workaround in my case is to just fix the mime type. I'm mainly just opening this issue as it'd be great for Prism to be more crash-resistant!
Steps to Reproduce
Sorry I don't have a full reproduction, hopefully the aforementioned endpoint definition is helpful.
Environment
v5.11.0
The text was updated successfully, but these errors were encountered: