diff --git a/RCTAppleHealthKit/RCTAppleHealthKit.m b/RCTAppleHealthKit/RCTAppleHealthKit.m index e69e6314da8ab9c368e01e16937dbecca70775d6..ba8d48de4eecaad222392f784674e75889ae3c94 100644 --- a/RCTAppleHealthKit/RCTAppleHealthKit.m +++ b/RCTAppleHealthKit/RCTAppleHealthKit.m @@ -253,9 +253,7 @@ RCT_EXPORT_METHOD(saveMindfulSession:(NSDictionary *)input callback:(RCTResponse [self.healthStore requestAuthorizationToShareTypes:writeDataTypes readTypes:readDataTypes completion:^(BOOL success, NSError *error) { if (!success) { - NSString *errMsg = [NSString stringWithFormat:@"Error with HealthKit authorization: %@", error]; - NSLog(errMsg); - callback(@[RCTMakeError(errMsg, nil, nil)]); + callback(@[RCTJSErrorFromNSError(error)]); return; } else { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{