mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-11-10 01:09:28 +08:00
[fix] recover initial MCP signaling connections and preserve failure reasons
This commit is contained in:
@@ -13,6 +13,7 @@ export class Failure extends Error {
|
||||
public code: string,
|
||||
public sideEffect = false,
|
||||
public retryable = false,
|
||||
public reason?: string,
|
||||
) {
|
||||
super(code);
|
||||
}
|
||||
@@ -23,6 +24,7 @@ export function failure(error: unknown): Data {
|
||||
code: e.code,
|
||||
retryable: e.retryable,
|
||||
side_effect_possible: e.sideEffect,
|
||||
...(e.reason ? { reason: e.reason } : {}),
|
||||
};
|
||||
}
|
||||
export function parse<T extends z.ZodType>(
|
||||
|
||||
Reference in New Issue
Block a user