-
Notifications
You must be signed in to change notification settings - Fork 465
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
multiGet does not report errors #105
Comments
Good catch. We have similar situation with CursorWindow in other issue. In the upcoming v2, I'm going to address this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In https:/react-native-community/react-native-async-storage/blob/608e2d80cd4a8aa3dbb2f7c08fb317ce4a180344/lib/AsyncStorage.js#L226
errors
is ignored, and does not propagate up to caller.I was able to determine this when I noticed some of my items were coming back undefined. If I used
AsyncStorage.getItem
, then I correctly saw why the item was coming back undefined:Cursor Window: Window is full
(the item I was trying to retrieve was greater than 1MB, which seems to be the limit.)But when using
multiGet
, the operation would fail silently.One solution would be to
reject
iferrors
:The current implementation resolves indiscriminately:
https:/react-native-community/react-native-async-storage/blob/608e2d80cd4a8aa3dbb2f7c08fb317ce4a180344/lib/AsyncStorage.js#L244
@react-native-community/async-storage 1.4.0
The text was updated successfully, but these errors were encountered: