# ConnectionError

sealed class ConnectionError

Optional explanation for a State.Disconnected state. In many cases, such as when initially started, the application may not have any additional details, but this class will be available from the state when we do.

#### Inheritors

BluetoothBondingFailure
ConnectedButNotReady

## Types

BluetoothBondingFailure
Link copied to clipboard
data class BluetoothBondingFailure(val bondError: Int?) : ReaderInfo.ConnectionError

When Bluetooth fails to bond, the observed behavior usually cycles from State.Connecting to State.Disconnected, or occasionally even from State.Ready to State.Disconnected. This error can explain why.

ConnectedButNotReady
Link copied to clipboard
object ConnectedButNotReady : ReaderInfo.ConnectionError

Bluetooth connected, but Square didn't. Most variations here should use other statues (one of State.Connecting, State.UpdatingFirmware, State.FailedToConnect, or State.Disabled), but this is a catch-all if none of those apply.