UNPKG

@iexec/web3telegram

Version:

Enables secure, blockchain-based messaging by encrypting Telegram user IDs for privacy. It lets users message Ethereum account holders without knowing their Telegram details.

20 lines 726 B
import { ApiCallError } from 'iexec/errors'; export class WorkflowError extends Error { isProtocolError; constructor({ message, errorCause, isProtocolError = false, }) { super(message); this.cause = errorCause; this.name = this.constructor.name; this.isProtocolError = isProtocolError; } } export function handleIfProtocolError(error) { if (error instanceof ApiCallError) { throw new WorkflowError({ message: "A service in the iExec protocol appears to be unavailable. You can retry later or contact iExec's technical support for help.", errorCause: error, isProtocolError: true, }); } } //# sourceMappingURL=errors.js.map