lspeasy / core/src / MiddlewareResult
Interface: MiddlewareResult
Defined in: packages/core/src/middleware/types.ts:125
The return value from a middleware function.
Remarks
Return undefined or void to continue the pipeline normally. Set shortCircuit: true (plus response or error) to bypass all remaining middleware and the final handler.
Never
NEVER short-circuit a request without providing a valid response or error — the pending request will never resolve and the client will time out with no recourse.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
error? | ErrorResponseMessage | The error response to return when short-circuiting with a failure. | packages/core/src/middleware/types.ts:131 |
response? | | RequestMessage | NotificationMessage | ResponseMessage | The response to return when short-circuiting a request. | packages/core/src/middleware/types.ts:129 |
shortCircuit? | boolean | When true, all remaining middleware and the final handler are bypassed. | packages/core/src/middleware/types.ts:127 |