File size: 446 Bytes
5710dd0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | /**
* Client-side RPC error surfaced when the debug-RPC envelope carries a
* non-zero `code`. Mirrors the server envelope (`{ code, msg, data,
* request_id }`) — the numeric `code` is the stable branch key across the
* wire, not `instanceof`.
*/
export class RPCError extends Error {
constructor(
readonly code: number,
message: string,
readonly details?: unknown,
) {
super(message);
this.name = 'RPCError';
}
}
|