import { ServiceError } from '@grpc/grpc-js'; /** * ErrorDetail contains the details of an error generated by an endorsing peer or ordering node. * It contains the address of the node as well as the error message it generated. */ export interface ErrorDetail { /** * Fabric node endpoint address. */ address: string; /** * Error message returned by the node. */ message: string; /** * Member services provider to which the node is associated. */ mspId: string; } /** * 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. */ export declare class GatewayError extends Error { /** * gRPC status code. * @see [https://grpc.io/docs/guides/status-codes/](https://grpc.io/docs/guides/status-codes/) * for descriptions of status codes. */ code: number; /** * gRPC error details. */ details: ErrorDetail[]; /** * Raw underlying gRPC [ServiceError](https://grpc.github.io/grpc/node/grpc.html#~ServiceError). */ cause: ServiceError; constructor(properties: Readonly<{ code: number; details: ErrorDetail[]; cause: ServiceError; message?: string; }>); } export declare function newGatewayError(err: ServiceError): GatewayError; //# sourceMappingURL=gatewayerror.d.ts.map