Returning an NSError (task.error) in the callback was causing the
following error:
RCTJSONStringify() encountered the following error: Invalid type in
JSON write (NSError) in RCTUtils.m (react-native v0.20.0). In
react-native 0.18.0 a SIGABT signal was raised. Since JSON can’t parse
an NSError, the contents of the NSError are first converted to an
NSDictionary which JSONStringify can process correctly. For
convenience, the localizedDescription is also added to the dictionary
(it’s also usually present in the userInfo.localizedDescription value,
but userInfo can be null)
Returning an NSError (task.error) in the callback was causing the following error: RCTJSONStringify() encountered the following error: Invalid type in JSON write (NSError) in RCTUtils.m (react-native v0.20.0). In react-native 0.18.0 a SIGABT signal was raised. Since JSON can’t parse an NSError, the contents of the NSError are first converted to an NSDictionary which JSONStringify can process correctly. For convenience, the localizedDescription is also added to the dictionary (it’s also usually present in the userInfo.localizedDescription value, but userInfo can be null)