-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discrepancy in error handling between iOS and Android for Amplify Auth #3922
Comments
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you! |
Hi @BigVeila, thanks for bringing this up. Currently there are no explicit plans for bringing the error handling into parity but we'll log this feature request in our backlog. |
@BigVeila |
Is this an issue with only About case Sign In Already?
Does Android also throw an invalid state and the underlying exception is SignInException?
On iOS only have enum AuthError `public enum AuthError {
}` |
Hi @BigVeila, Inconsistent error handling is something we would like to work on for a future Amplify major version. It is something that we can't easily reconcile on our v2, as it would require breaking changes, but we have held internal meetings on the topic. The current behavioral differences are partially due to language differences (ex: inheritance). |
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
The text was updated successfully, but these errors were encountered: