Skip to content

@gala-chain/apiAPI


API > GalaChainErrorResponse

Class: GalaChainErrorResponse<T>

Contents

Extends

Type parameters

T

Constructors

new GalaChainErrorResponse(message, errorCode, errorKey, errorPayload)

new GalaChainErrorResponse\<T>(message, errorCode?, errorKey?, errorPayload?): GalaChainErrorResponse\<T>

Parameters

message: string

errorCode?: number

errorKey?: string

errorPayload?: Record\<string, unknown>

Overrides

GalaChainResponse.constructor

Source

chain-api/src/types/contract.ts:98

new GalaChainErrorResponse(error)

new GalaChainErrorResponse\<T>(error): GalaChainErrorResponse\<T>

Parameters

error: object

error.message?: string

Overrides

GalaChainResponse\<T>.constructor

Source

chain-api/src/types/contract.ts:100

new GalaChainErrorResponse(error)

new GalaChainErrorResponse\<T>(error): GalaChainErrorResponse\<T>

Parameters

error: ChainError

Overrides

GalaChainResponse\<T>.constructor

Source

chain-api/src/types/contract.ts:102

Properties

Data

readonly Data?: T

Inherited from

GalaChainResponse.Data

Source

chain-api/src/types/contract.ts:30


ErrorCode

readonly ErrorCode: number

Overrides

GalaChainResponse.ErrorCode

Source

chain-api/src/types/contract.ts:94


ErrorKey

readonly ErrorKey: string

Overrides

GalaChainResponse.ErrorKey

Source

chain-api/src/types/contract.ts:95


ErrorPayload

readonly ErrorPayload?: Record\<string, unknown>

Overrides

GalaChainResponse.ErrorPayload

Source

chain-api/src/types/contract.ts:96


Message

readonly Message: string

Overrides

GalaChainResponse.Message

Source

chain-api/src/types/contract.ts:93


Status

readonly Status: Error

Overrides

GalaChainResponse.Status

Source

chain-api/src/types/contract.ts:92

Methods

Error()

Error(e)

static Error\<T>(e): GalaChainResponse\<T>

Type parameters

T

Parameters

e: object

e.message?: string

Inherited from

GalaChainResponse.Error

Source

chain-api/src/types/contract.ts:34

Error(e)

static Error\<T>(e): GalaChainResponse\<T>

Type parameters

T

Parameters

e: ChainError

Inherited from

GalaChainResponse.Error

Source

chain-api/src/types/contract.ts:35

Error(Message, ErrorCode, ErrorKey, ErrorPayload)

static Error\<T>(Message, ErrorCode, ErrorKey, ErrorPayload?): GalaChainResponse\<T>

Type parameters

T

Parameters

Message: string

ErrorCode: number

ErrorKey: string

ErrorPayload?: Record\<string, unknown>

Inherited from

GalaChainResponse.Error

Source

chain-api/src/types/contract.ts:36


Success()

static Success\<T>(Data): GalaChainResponse\<T>

Type parameters

T

Parameters

Data: T

Inherited from

GalaChainResponse.Success

Source

chain-api/src/types/contract.ts:31


Wrap()

static Wrap\<T>(op): Promise\<GalaChainResponse\<T>>

Type parameters

T

Parameters

op: Promise\<T>

Inherited from

GalaChainResponse.Wrap

Source

chain-api/src/types/contract.ts:56


deserialize()

static deserialize\<T>(constructor, object): GalaChainResponse\<T>

Type parameters

T

Parameters

constructor: undefined | ClassConstructor\<Inferred\<T>>

object: string | Record\<string, unknown>

Inherited from

GalaChainResponse.deserialize

Source

chain-api/src/types/contract.ts:70


isError()

static isError\<T>(r): r is GalaChainErrorResponse<T>

Type parameters

T

Parameters

r: GalaChainResponse\<T>

Inherited from

GalaChainResponse.isError

Source

chain-api/src/types/contract.ts:66


isSuccess()

static isSuccess\<T>(r): r is GalaChainSuccessResponse<T>

Type parameters

T

Parameters

r: GalaChainResponse\<T>

Inherited from

GalaChainResponse.isSuccess

Source

chain-api/src/types/contract.ts:62