Formatting

This commit is contained in:
2026-08-03 03:40:57 +00:00
parent 97d4422b8f
commit c9845d0f28
6 changed files with 214 additions and 246 deletions
+4 -5
View File
@@ -20,7 +20,8 @@ const WS_ROUTE = '/ws';
// Strict validation prevents legacy or protocol-specific fields reaching routes.
const wsRequestSchema = z
.object({
id: z.string().min(1).optional(),
id: z.string().min(1)
.optional(),
path: z.string().min(1),
body: z.unknown().optional(),
})
@@ -178,13 +179,11 @@ export class WsTransportRouter implements UpgradeTransportRouter {
* @param error - Failure to normalize into the public error shape.
*/
private sendError(ws: WSContext, requestId: string | undefined, error: unknown): void {
ws.send(
toExtendedJson({
ws.send(toExtendedJson({
...(requestId === undefined ? {} : { id: requestId }),
type: 'error',
...normalizePublicError(error),
}),
);
}));
}
/**