A GatewayError is thrown if an error is encountered while processing a transaction through the gateway. Since the gateway delegates much of the processing to other nodes (endorsing peers and orderers), then the error could have originated from one or more of those nodes. In that case, the details field will contain an array of ErrorDetail objects.

Hierarchy (view full)



cause: ServiceError

Raw underlying gRPC error.

code: number

gRPC status code.


https://grpc.github.io/grpc/core/md_doc_statuscodes.html for descriptions of status codes.

details: ErrorDetail[]

gRPC error details.

message: string
name: string
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

    • (err, stackTraces): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

stackTraceLimit: number


  • Create .stack property on a target object


    • targetObject: object
    • Optional constructorOpt: Function

    Returns void