Companion

object Companion

Decoders from the two places a ledger failure arrives: a thrown gRPC status, or a google.rpc.Status inside a completion.

Functions

Link copied to clipboard
fun from(status: Status): CantonError

Decodes a CantonError from a google.rpc.Status proto — the form carried by command Completion events when the ledger rejects a command asynchronously (contention, time bounds). Uses the same google.rpc detail decoding as gRPC failures.

fun from(throwable: Throwable): CantonError?

Decodes a CantonError from a gRPC failure, or returns null if throwable is not a gRPC status error.