import { WyreErrorType } from './WyreErrorType' export class WyreError { language: string // 'en' exceptionId: string // 'TUACJ8' errorCode: string // 'transfer.insufficientFunds' compositeType: string // '' subType: string // '' message: string // 'Insufficient funds' type: WyreErrorType // 'InsufficientFundsException' typeAsString?: string // 'OrderTooLargeException' transient: boolean // false } export function isWyreError(error: any): boolean { const { exceptionId, type } = error return (exceptionId && type) }