Errors
9 min
all errors are represented by the toroerror enum which conforms to swift's standard error protocol below is a list of possible errors you may encounter error categories all errors in the sdk belong to one of the following categories user cancellations error type description customercancelled transaction was cancelled by the customer on the payment terminal operatorcancelled transaction was cancelled in app by calling toro canceltransaction() device related errors error type description deviceconnectionfailed unable to connect to the selected device devicenotselected no device selected must set via toro selecteddevice property devicedisconnected connection was lost during operation deviceerror generic device error with descriptive message devicebusy an operation is already in progress on the selected device deviceupdatefailed error occurred during device firmware/configuration update devicenotsupported device lacks a required feature for the requested operation closebluetoothconnectionfailed failed to close bluetooth connection with device card related errors error type description unsupportedcard presented card is not supported by the terminal cardreaderror error reading the card issue could be with card or terminal hardware magswipeerror error during a magnetic stripe transaction transaction state errors error type description transactionalreadystarted cannot start a new transaction while one is in progress transactionaborted transaction was aborted for an unspecified reason transactiontimeout card was not presented within the time limit transactionerror generic transaction error with descriptive message gateway & communication errors error type description acceptorrejected transaction rejected by toro gateway/acquirer terminalmanagerrejected tms rejected the statusreport during device or parameter updates gatewayunavailable no response received from gateway (timeout) badgatewayresponse gateway returned an invalid response malformedresponse unexpected data format received in gateway response malformedrequest request could not be properly formatted gatewaysecurityexception error during security trailer generation or verification resource & validation errors error type description p2peerror error during point to point encryption operation assetnotfound required sdk asset not found validationerror input validation failed with descriptive message generic errors error type description unknownerror generic fallback error when no specific type applies error properties each toroerror provides two helpful properties message a detailed description of what went wrong title a shorter title suitable for ui display
