UNPKG

@cessnetwork/api

Version:

CESS Chain Interface Implementation in TypeScript

24 lines 807 B
export class SDKError extends Error { constructor(message, code, details) { super(message); this.code = code; this.details = details; this.name = 'SDKError'; } } export class TransactionError extends SDKError { constructor(message, txHash, dispatchError) { super(message, 'TRANSACTION_ERROR', { txHash, dispatchError }); this.txHash = txHash; this.dispatchError = dispatchError; this.name = 'TransactionError'; } } export var ErrorType; (function (ErrorType) { ErrorType["ERR_Failed"] = "failed"; ErrorType["ERR_Timeout"] = "request timeout"; ErrorType["ERR_Empty"] = "empty result"; ErrorType["ERR_PriorityIsTooLow"] = "Priority is too low"; })(ErrorType || (ErrorType = {})); //# sourceMappingURL=error.js.map