Skip to content

Commit

Permalink
return error
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkVillacampa committed Apr 9, 2024
1 parent 8557107 commit 56760dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ios/RNPurchases.m
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,11 @@ static void logUnavailablePresentCodeRedemptionSheet() {
completion:[self getResponseCompletionBlockWithResolve:resolve
reject:reject]];
} else {
NSLog(@"[Purchases] Warning: tried to handle Observer Mode transaction, but it's only available on iOS 15.0 or greater.");
resolve(nil);
NSString* description = @"Tried to handle Observer Mode transaction, but it's only available on iOS 15.0 or greater.";
NSError* error = [[NSError alloc] initWithDomain: RCPurchasesErrorCodeDomain
code: RCUnknownError
userInfo: @{NSLocalizedDescriptionKey : description}];
reject([NSString stringWithFormat:@"%ld", (long) error.code], [error localizedDescription], error);
}
}

Expand Down

0 comments on commit 56760dc

Please sign in to comment.