Skip to content

Commit 8fe1564

Browse files
committed
docs(devframe): clarify onServerError applies to owned servers only
The option silently does nothing when a `server` is supplied, so lead the JSDoc with that constraint (and why — the caller owns that object and its crash semantics are not devframe's to change) instead of mentioning it mid-paragraph. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent e5a717e commit 8fe1564

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

packages/devframe/src/node/server.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,13 @@ export interface StartHttpAndWsOptions {
111111
*/
112112
onReady?: (info: { origin: string, port: number, app: H3 }) => void | Promise<void>
113113
/**
114-
* Called for any error the owned HTTP server emits after it starts
114+
* Called for any error the HTTP server devframe owns emits after it starts
115115
* listening — e.g. a transient `EMFILE` while accepting a connection.
116-
* Ignored when a `server` is supplied — the caller already owns that
117-
* object and can listen on it directly. Without this, a post-bind error
118-
* has no listener and crashes the process.
116+
* Without it such an error has no listener and crashes the process.
117+
*
118+
* Applies only to a server devframe created itself. When `server` is
119+
* supplied the caller owns that object and attaches to it directly, so
120+
* devframe leaves its error handling alone.
119121
*/
120122
onServerError?: (error: Error) => void
121123
}

0 commit comments

Comments
 (0)