Skip to content

Discrepancy in error handling between iOS and Android for Amplify Auth #3922

@BigVeila

Description

@BigVeila

Is your feature request related to a problem? Please describe.

I’ve noticed a significant discrepancy in how errors are handled and reported between iOS and Android for Amplify Auth. On iOS, errors are very simplified, using an enum like AuthError.invalidState with a general message. However, on Android, the same error provides much more detailed information, including the exception name like SignInException and additional context.

This inconsistency makes it challenging to maintain parity between platforms and handle errors effectively across both. For example, when trying to sign in while a user is already signed in:
• On iOS, the error is simply invalidState with a generic message. (About case Sign In Already, return only RecoverySuggestionn and ErrorDescription, Error is nil)
• On Android, the error includes the exception name SignInException, making it clearer and easier to debug.

Are there plans to align error reporting between iOS and Android so developers can have a consistent experience across platforms? It would be helpful if iOS errors could also include more detailed information, similar to Android.

Describe the solution you'd like

I would like to receive more detailed errors similar to those on Android.

Describe alternatives you've considered

No idea

Is the feature request related to any of the existing Amplify categories?

Auth

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions