Skip to content

Commit 575083d

Browse files
committed
fix(dynamic-links, ios): resolveLink 404 error handling fix
the underlying SDK started returning an error for 404s with an error message, previously it did not. Bending new error into existing error encoding for backwards compatibility
1 parent cd5a451 commit 575083d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/dynamic-links/ios/RNFBDynamicLinks/RNFBDynamicLinksModule.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ - (id)init {
193193
@"url": dynamicLink.url.absoluteString,
194194
@"minimumAppVersion": dynamicLink.minimumAppVersion == nil ? [NSNull null] : dynamicLink.minimumAppVersion,
195195
});
196-
} else if (!error) {
196+
} else if (!error || (error && [error.localizedDescription containsString:@"dynamicLinks error 404"])) {
197197
[RNFBSharedUtils rejectPromiseWithUserInfo:reject userInfo:(NSMutableDictionary *) @{
198198
@"code": @"not-found",
199199
@"message": @"Dynamic link not found"

0 commit comments

Comments
 (0)