Open rj93 opened 3 years ago
I have the exact same error trace (same files and lines), but with a different unexpected token. I'm not uploading any files, but I'm not sure what is going wrong in the JSON being passed. Is there some way to see the complete "wrong" JSON, maybe in some logs?
I have the same error. The error does not seem to occur when the upload is less than ~100kb. The error does not occur when running outside of a docker container (e.g. npx prism mock my-api.yaml
allows for essentially an unlimited binary upload)
Describe the bug
When attempting to hit a file upload endpoint that accepts a binary type, the docker errors and exits.
To Reproduce
/usr/src/prism/node_modules/split2/index.js:44 push(this, this.mapper(list[i])) ^ SyntaxError: Unexpected token ^ in JSON at position 623220 at Transform.parse [as mapper] ()
at Transform.transform [as _transform] (/usr/src/prism/node_modules/split2/index.js:44:23)
at Transform._read (/usr/src/prism/node_modules/split2/node_modules/readable-stream/lib/_stream_transform.js:177:10)
at Transform._write (/usr/src/prism/node_modules/split2/node_modules/readable-stream/lib/_stream_transform.js:164:83)
at doWrite (/usr/src/prism/node_modules/split2/node_modules/readable-stream/lib/_stream_writable.js:409:139)
at writeOrBuffer (/usr/src/prism/node_modules/split2/node_modules/readable-stream/lib/_stream_writable.js:398:5)
at Transform.Writable.write (/usr/src/prism/node_modules/split2/node_modules/readable-stream/lib/_stream_writable.js:307:11)
at Socket.ondata (_stream_readable.js:718:22)
at Socket.emit (events.js:314:20)
at addChunk (_stream_readable.js:297:12)
$
{ "url": "https://example.com/image.png" }