Skip to content

Commit c0df265

Browse files
deokjinkimtargos
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 027e738 commit c0df265

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/stream.md

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy