Feature request: Expose security framework result code when throwing error
See original GitHub issueHi there,
We saw a huge spike in Sentry about an error that this package throws on iOS. It’s weird since we haven’t upgrade this package. We did upgrade react native to 0.62.2 though.
Error getItem(react-native/Libraries/BatchedBridge/NativeModules)
An error occured while retrieving value
I know this can happen, and it’s our mistake of not handling the error properly.
But, it would be very handy if the result code was shown in that error as well. That way we have a starting point for debugging purposes, since it’s not on a specific device, nor a specific iOS version, and it only started happening on our latest release.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Security Framework Result Codes - Documentation
Evaluate result codes common to many Security framework functions. ... The requested name isn't allowed for this certificate.
Read more >Error Handling - OWASP Cheat Sheet Series
Error handling is a part of the overall security of an application. ... may be prudent to return 4xx error codes, when we...
Read more >How to Write Helpful Error Messages to Improve Your App's ...
The key is an error code, and the value is a corresponding message. The error codes should be the same codes you receive...
Read more >Clean Code and the Art of Exception Handling - Toptal
Clean Code and the Art of Exception Handling. Exceptions are as old as programming itself. An unhandled exception may cause unexpected behavior, and...
Read more >Error monitoring and exception handling in large-scale ...
Learn how to handle errors and exceptions on large scale software projects, ... who will uncover bugs your team didn't catch and didn't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve got the code up and running locally, I’ve tested by rejecting with arbitrary
OSStatus
members such aserrSecNoSuchKeychain
and the equivalent code (-25294
) was sent back to JS in theerror.code
property. I then used osstatus.com to search for the code and check if the results matched the native error.This experiment was successful and you can expect a release tomorrow morning, or rather afternoon in Belgium 😅
Hi! I’ve also been using this in production for a while now without this kind of incident. I’m sorry to hear that you’ve been facing some problems using this library.
I can definitely look into forwarding this kind of info though. I’m wondering if the base AsyncStorage module does this or not.
Regardless, it should be an easy fix and I’ll try to release a new version in the upcoming days.