@gala-chain/chaincode ∙ API
API > InsufficientBurnAllowanceError
new InsufficientBurnAllowanceError(
user
,allowedQuantity
,quantity
,tokenInstanceKey
,toPersonKey
):InsufficientBurnAllowanceError
▪ user: string
▪ allowedQuantity: BigNumber
▪ quantity: BigNumber
▪ tokenInstanceKey: TokenInstanceKey
▪ toPersonKey: string
InsufficientAllowanceError
.constructor
chaincode/src/burns/BurnError.ts:43
readonly
code:ErrorCode
Status code, a value from ErrorCode enum. It is directly mapped to HTTP, status, it is a constant value to be used by clients integrating with the chain.
InsufficientAllowanceError
.code
chain-api/src/utils/error.ts:45
readonly
key:Uppercase
<string
>
An upper case string to be used as a key do diagnose where the error comes from and help with regular development. It should not be used by client integrating with the chain since we don't guarantee it won't change. It is generated from original error class name.
InsufficientAllowanceError
.key
chain-api/src/utils/error.ts:53
message:
string
InsufficientAllowanceError
.message
node_modules/typescript/lib/lib.es5.d.ts:1076
name:
string
InsufficientAllowanceError
.name
node_modules/typescript/lib/lib.es5.d.ts:1075
readonly
payload?:Record
<string
,unknown
>
Additional information to be used by
InsufficientAllowanceError
.payload
chain-api/src/utils/error.ts:58
stack?:
string
InsufficientAllowanceError
.stack
node_modules/typescript/lib/lib.es5.d.ts:1077
andExec(
fn
):ChainError
Allows to execute function getting as a parameter the current error.
▪ fn: (e
) => void
InsufficientAllowanceError
.andExec
throw CommonChainError.objectNotFound(objectId).andExec((e) => {
logger.error(e.message);
});
chain-api/src/utils/error.ts:114
logError(
logger
):ChainError
▪ logger: object
▪ logger.error
InsufficientAllowanceError
.logError
chain-api/src/utils/error.ts:119
logWarn(
logger
):ChainError
▪ logger: object
▪ logger.warn
InsufficientAllowanceError
.logWarn
chain-api/src/utils/error.ts:124
map(
key
,newError
):ChainError
Maps ChainError to another chain error by error code if key
param matches
current error code or current diagnostic key. Otherwise, returns original
error.
Useful in rethrowing an error or mapping an error to another one in catch clauses or catch methods in promises.
▪ key: ErrorCode
| ClassConstructor
<ChainError
>
error code or error class to match
▪ newError: ChainError
| (e
) => ChainError
new error or a function to create the new error
InsufficientAllowanceError
.map
chain-api/src/utils/error.ts:148
matches(
key
):boolean
▪ key: ErrorCode
| ClassConstructor
<ChainError
>