net: throw on an invalid socket handler config instead of aborting - #31817
Closed
alii wants to merge 7 commits into
Closed
net: throw on an invalid socket handler config instead of aborting#31817alii wants to merge 7 commits into
alii wants to merge 7 commits into
Claude / Claude Code Review
completed
Jun 4, 2026 in 12m 33s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 1 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟣 Pre-existing | src/runtime/socket/Handlers.rs:305-313 |
Error messages use internal handler names instead of user-facing ones |
Annotations
Check notice on line 313 in src/runtime/socket/Handlers.rs
claude / Claude Code Review
Error messages use internal handler names instead of user-facing ones
Nit (pre-existing, not introduced here): these error messages use the internal handler names (`"onOpen"`, `"onWritable"`, …) rather than the user-facing keys defined in `SocketConfig.bindv2.ts` (`"open"`, `"drain"`, …). So `socket: { drain: 123 }` produces `Expected "onWritable" callback to be a function` — a name the user never wrote. Since these literals were re-typed into the new `validate_callback!` macro anyway, it might be worth swapping them to the public names in passing; non-blocking ei
Loading