Added a more descriptive error message for AuthorizationExceptions#886
Added a more descriptive error message for AuthorizationExceptions#886KevinvdBurg wants to merge 9 commits into
Conversation
|
Thanks for your PR @KevinvdBurg I noticed that you only modified the error description for Android. Is iOS already providing this additional error information? If not, would you be able to update your PR to keep iOS and Android aligned? |
|
Hi @robwalkerco, I'm trying to open the iOS project, but I'm getting the following error 🤔 But also, I'm unsure where the iOS variant |
|
Thanks for this contribution, @KevinvdBurg! I was able to verify the Android behavior locally, and the added cause detail makes the error much more useful for debugging. I’m going to continue the work from here by bringing the branch up to date with the current repo structure and extending the same underlying-error detail to iOS as well. I'll make sure to give you git credit when I merge it! |
There was a problem hiding this comment.
Pull request overview
Adds more actionable authorization failure messages by including underlying native error details (Android Throwable cause / iOS NSUnderlyingErrorKey) so JS-side errors are less vague for troubleshooting and UX decisions.
Changes:
- iOS: Append the underlying
NSError’s localized description to the error message when present. - Android: Append the
AuthorizationExceptioncause’s localized message to the error message when present. - Add a patch changeset describing the behavior change.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/react-native-app-auth/ios/RNAppAuth.m | Extends iOS error message formatting to include NSUnderlyingErrorKey details when available. |
| packages/react-native-app-auth/android/src/main/java/com/rnappauth/RNAppAuthModule.java | Extends Android authorization exception rejection messages to include the throwable cause details. |
| .changeset/fuzzy-ravens-explain.md | Declares a patch release for the improved error messages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Keep user-facing auth error messages unchanged while surfacing underlying native diagnostics through error.nativeError.
Document the separate nativeError debug field without suggesting native details belong in user-facing messages.
|
@bryceknz is attempting to deploy a commit to the formidable-labs Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: 51c1241 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Pass Android nativeError metadata without dropping the original AuthorizationException, and align the changeset frontmatter with repo style.

Description
Adds underlying native error details to authorization failures so vague messages like
Network errorinclude the lower-level cause when available.This revives the original Android improvement, updates it for the current package layout, and extends the same behavior to iOS.
Related: #861, #745, #799.
Verification
https://expired.badssl.com.Network error - Cause: Unacceptable certificate..., proving the native cause is surfaced.