Skip to content

Commit 3fb5c6d

Browse files
deokjinkimdanielleadams
authored andcommitted
doc: fix actual result of example is different in stream
Error message of JSON.parse may be changed with current node version. For reference, actual result is same with previous node version(v16.18.1). PR-URL: #45619 Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
1 parent 8a1e556 commit 3fb5c6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/stream.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ server.listen(1337);
172172
// $ curl localhost:1337 -d "\"foo\""
173173
// string
174174
// $ curl localhost:1337 -d "not json"
175-
// error: Unexpected token o in JSON at position 1
175+
// error: Unexpected token 'o', "not json" is not valid JSON
176176
```
177177

178178
[`Writable`][] streams (such as `res` in the example) expose methods such as

0 commit comments

Comments
 (0)