@gala-chain/api ∙ API
API > GalaChainErrorResponse
Class: GalaChainErrorResponse<T>
Contents
- Extends
- Type parameters
- Constructors
- new GalaChainErrorResponse(message, errorCode, errorKey, errorPayload)
- new GalaChainErrorResponse(error)
- new GalaChainErrorResponse(error)
- Properties
- Data
- ErrorCode
- ErrorKey
- ErrorPayload
- Message
- Status
- Methods
- Error()
- Success()
- Wrap()
- deserialize()
- isError()
- isSuccess()
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
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
Source
chain-api/src/types/contract.ts:30
ErrorCode
readonly
ErrorCode:number
Overrides
Source
chain-api/src/types/contract.ts:94
ErrorKey
readonly
ErrorKey:string
Overrides
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
Source
chain-api/src/types/contract.ts:93
Status
readonly
Status:Error
Overrides
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
Source
chain-api/src/types/contract.ts:34
Error(e)
static
Error\<T
>(e
):GalaChainResponse
\<T
>
Type parameters
▪ T
Parameters
▪ e: ChainError
Inherited from
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
Source
chain-api/src/types/contract.ts:36
Success()
static
Success\<T
>(Data
):GalaChainResponse
\<T
>
Type parameters
▪ T
Parameters
▪ Data: T
Inherited from
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
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
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
Source
chain-api/src/types/contract.ts:66
isSuccess()
static
isSuccess\<T
>(r
):r is GalaChainSuccessResponse<T>
Type parameters
▪ T
Parameters
▪ r: GalaChainResponse
\<T
>