MCPcopy Create free account
hub / github.com/solana-program/system / isSystemError

Function isSystemError

clients/js/src/generated/errors/system.ts:70–77  ·  view source on GitHub ↗
(
    error: unknown,
    transactionMessage: { instructions: Record<number, { programAddress: Address }> },
    code?: TProgramErrorCode,
)

Source from the content-addressed store, hash-verified

68}
69
70export function isSystemError<TProgramErrorCode extends SystemError>(
71 error: unknown,
72 transactionMessage: { instructions: Record<number, { programAddress: Address }> },
73 code?: TProgramErrorCode,
74): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> &
75 Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {
76 return isProgramError<TProgramErrorCode>(error, transactionMessage, SYSTEM_PROGRAM_ADDRESS, code);
77}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected