# CheckoutError
The Flow `CheckoutComponents.Error.errorCode` struct conforms to standard Swift `LocalizedError` protocol.
There are four types:
* `integration`
* `request`
* `paymentMethod`
* `submit`
* `validation`
Each of them contains the following properties:
| Property | Type | Description |
| --- | --- | --- |
| `message` | `String` | A human-readable description of the error. The description is subject to change. For example, to improve clarity. To ensure you catch errors correctly, reference the values returned by the type and code fields instead. |
| `errorCode` | `ErrorCode` | A code representing the error. To see how to resolve it, see [Error codes](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-mobile-app/flow-for-mobile-library-reference/ios/error-codes.md). |
| `details` | `ErrorDetails` | Additional error properties.
All error types return the following properties in the `ErrorDetails` object:
- `mobileSessionID`
- `paymentID`
- `paymentSessionID`
- `type` |
## integration
Integration errors are caused by an invalid use of the Flow SDK.
`integration` contains the following properties:
| Property | Type | Description |
| --- | --- | --- |
| `mobileSessionId` | `String` | The unique identifier of the browser session that created the `FlowComponent`. |
| `paymentSessionId` | `String` | The unique identifier of the [payment session response](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession!c=201&path=id&t=response). |
| `type` | `ComponentType` | The name of the payment method used for the payment, if applicable. |
## request
Request errors are caused by network request failures.
`request` contains the following properties:
| Property | Type | Description |
| --- | --- | --- |
| `mobileSessionId` | `String` | The unique identifier of the browser session that created the `FlowComponent`. |
| `paymentSessionId` | `String` | The unique identifier of the provided [payment session response](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession!c=201&path=id&t=response). |
| `type` | `ComponentType` | The name of the payment method used for the payment, if applicable. |
## paymentMethod
Payment method errors are caused by unexpected failures when integrating a payment method's client-side library.
`paymentMethod` contains the following properties:
| Property | Type | Description |
| --- | --- | --- |
| `mobileSessionId` | `String` | The unique identifier of the browser session that created the `FlowComponent`. |
| `paymentSessionId` | `String` | The unique identifier of the provided [payment session response](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession!c=201&path=id&t=response). |
| `type` | `ComponentType` | The name of the payment method used for the payment, if applicable. |
## submit
Submit errors are caused by invalid attempts to submit a payment request.
`submit` contains the following properties:
| Property | Type | Description |
| --- | --- | --- |
| `mobileSessionId` | `String` | The unique identifier of the browser session that created the `FlowComponent`. |
| `paymentSessionId` | `String` | The unique identifier of the provided [payment session response](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession!c=201&path=id&t=response). |
| `type` | `ComponentType` | The name of the payment method used for the payment, if applicable. |
## validation
Validation errors are caused by an invalid value in the `UpdateDetails` passed to the `CheckoutComponents.update()` method.
| Property | Type | Description |
| --- | --- | --- |
| `mobileSessionId` | `String` | The unique identifier of the browser session that created the `FlowComponent`. |
| `paymentSessionId` | `String` | The unique identifier of the provided [payment session response](https://api-reference.checkout.com/tag/Flow/#operation/CreatePaymentSession!c=201&path=id&t=response). |
| `type` | `ComponentType` | The name of the payment method used for the payment, if applicable. |