SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
5710dd0 verified
Raw History Blame Contribute Delete
446 Bytes
/**
* 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';
}
}