> ## Documentation Index
> Fetch the complete documentation index at: https://otpless.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Error Codes

In Flutter, error codes align with the respective native SDKs:

* **For Android**: Flutter follows the error codes defined by the [Android SDK](https://otpless.com/docs/frontend-sdks/app-sdks/android/new/references/error-codes).
* **For iOS**: Flutter follows the error codes defined by the [iOS SDK](https://otpless.com/docs/frontend-sdks/app-sdks/ios/new/references/error-codes).

This means that when handling errors in Flutter, you should refer to the platform-specific error codes based on whether the app is running on Android or iOS.

## Sample code

To handle errors in flutter for Android and iOS, [refer this](/docs/frontend-sdks/app-sdks/flutter/new/headless/#error-handling)
