Give server() consumers the onRequest hook the docs promise (#86)
* Regression tests for an onRequest hook on server() * Compose the application's onRequest hook into server() past bind * Document the server's onRequest hook and record the composition decision * Pin that a re-bind and a pre-bind unbind never reach the hook, and that a non-function hook is refused at startup * Keep every bind and all pre-bind traffic out of the application's hook * Make the hook's published promises exact, and record the src layout deferral * Trim the record to what the tests do not already forbid * Pin that nothing answers a request whose hook failed * Answer nothing for a request whose hook failed, on both surfaces alike * State the hook's failure policy as it now behaves * Name the request a failed handler left unanswered, and say what a wedged hook reports
This commit is contained in:
+5
-1
@@ -397,7 +397,11 @@ export class Session extends EventEmitter<SessionEvents> {
|
||||
void this.incoming.handle(pduObj).catch((thrown: unknown) => {
|
||||
const err = errorFrom(thrown);
|
||||
|
||||
this.log.error('session - a handler threw', { message: err.message });
|
||||
this.log.error('session - a handler threw', {
|
||||
cmdName: pduObj.cmdName,
|
||||
message: err.message,
|
||||
seqNr: pduObj.seqNr,
|
||||
});
|
||||
this.emit('sessionError', err);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user