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

[android]error not easy to "filter" #323

Open
farfromrefug opened this issue Mar 30, 2020 · 1 comment
Open

[android]error not easy to "filter" #323

farfromrefug opened this issue Mar 30, 2020 · 1 comment

Comments

@farfromrefug
Copy link

On android if you open the picker and then hit back, the promise will reject here
There are 2 errors there:

  • it should not reject in a sense. It should simply return no file selected (empty array). This is not an error
  • seeing you return an error it means i need to filter it. Because my use won't care about Image picker activity result code 0 ;)

So the first thing is that your error should be easier to filter. Maybe a custom Error with a status code property?
And would you consider not rejecting on user just going back?

@SpurguX
Copy link

SpurguX commented Aug 5, 2021

0 is the standard activity result for a cancelled operation. https://developer.android.com/reference/android/app/Activity#RESULT_CANCELED

But I agree that the result code could be a property of the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants