We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When sending an invalid JSON body, we get an incorrect response shape.
$ curl -s 'http://localhost:1234/photos' \ -H 'content-type: application/json' \ --data-raw '[' | jq '.' { "error": { "code": "invalid_json", "message": "Invalid JSON", "stack": "Error: Invalid JSON\n at parseJSON (/Users/oliver/Code/unsplash/unsplash-web/node_modules/.pnpm/[email protected]/node_modules/micri/webpack:/micri/src/body.ts:52:1)\n at /Users/oliver/Code/unsplash/unsplash-web/node_modules/.pnpm/[email protected]/node_modules/micri/webpack:/micri/src/body.ts:56:1\n at processTicksAndRejections (node:internal/process/task_queues:105:5)\n at handler (/Users/oliver/Code/unsplash/unsplash-web/node_modules/.pnpm/@[email protected]/node_modules/@stoplight/prism-http-server/dist/server.js:60:22)", "originalError": {} } }
A response of the shape described here.
I presume an error is being thrown here and we're not catching it?:
prism/packages/http-server/src/server.ts
Line 75 in 75d0f96
Related: #1745
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When sending an invalid JSON body, we get an incorrect response shape.
Current Behavior
Expected Behavior
A response of the shape described here.
I presume an error is being thrown here and we're not catching it?:
prism/packages/http-server/src/server.ts
Line 75 in 75d0f96
Related: #1745
The text was updated successfully, but these errors were encountered: