Skip to content

Commit a98a7f9

Browse files
committed
refactor(readme): replace node-internal stack trace example for clarity
1 parent e8479b3 commit a98a7f9

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ The Resulting "Messy" Stack Trace:
172172
```shell
173173
Error: Failed to connect: "ws://localhost:3000"
174174
at /project/node_modules/neverthrow/dist/index.cjs.js:106:34 <-- 🛑 Useless! Internal library code.
175-
at processTicksAndRejections (node:internal/process/task_queues:95:5)
176-
at async /project/src/main.ts:15:20
175+
at processTicksAndRejections (native)
177176
```
178177

179178
You’ll notice the top frames point to internal files of `neverthrow`, making it impossible to see where your business logic actually failed.
@@ -196,8 +195,7 @@ now the stack trace points to your business logic:
196195
Error: Failed to connect: "ws://localhost:3000"
197196
at /project/mcp/client.ts:15:11 <-- 🟢 Useful! Business code.
198197
at /project/node_modules/neverthrow/dist/index.cjs.js:106:34
199-
at processTicksAndRejections (node:internal/process/task_queues:95:5)
200-
at async /project/src/main.ts:15:20
198+
at processTicksAndRejections (native)
201199
```
202200

203201
🎯 The "Crime Scene": Callback Freedom

0 commit comments

Comments
 (0)