Skip to content
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

[iOS] Fixes Reject error kind in Fabric #41955

Closed

Conversation

zhongwuzw
Copy link
Contributor

Summary:

Fixes #41950 .

Changelog:

[IOS] [FIXED] - Fixes Reject error kind in Fabric

Test Plan:

reject returns Error.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Dec 15, 2023
@analysis-bot
Copy link

analysis-bot commented Dec 15, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 16,569,922 -72,516
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 19,951,036 -87,388
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: aa2d613
Branch: main

@ryancat
Copy link
Contributor

ryancat commented Dec 16, 2023

This change exposed the original error instead of the one created from RCTJSErrorFromCodeMessageAndNSError. I am not sure if there's any side effect/implications of that.

It seems the RCTMakeError is merely a wrapper to the error message though.

cc @sammy-SC for more details on this.

Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @zhongwuzw, thanks for the effort.
I think your changes mixes a little the semantic of the Error and lose some information from the ObjectiveC dictionary.
I suggested an approach that mixes what was happening before your changes with your suggestions.

You have the valid point of creating the Error, but I think it's better if we preserve the cause of the Error.
What do you think?

@zhongwuzw
Copy link
Contributor Author

@cipolleschi Please review again.

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@zhongwuzw
Copy link
Contributor Author

@javache @cipolleschi Please review again. :)

Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks good to me. There is only a small nit.

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 10, 2024
@facebook-github-bot
Copy link
Contributor

@cipolleschi merged this pull request in 9525074.

gokul1099 pushed a commit to gokul1099/react-native-visionos that referenced this pull request Jan 17, 2024
Summary:
Fixes facebook#41950 .

bypass-github-export-checks

## Changelog:

[IOS] [FIXED] - Fixes Reject error kind in Fabric

Pull Request resolved: facebook#41955

Test Plan: reject returns `Error`.

Reviewed By: javache

Differential Revision: D52622682

Pulled By: cipolleschi

fbshipit-source-id: 726e68d968d03505748191263b7e6b75a068c130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS native module rejections are not instanceof Error
6 participants