diff --git a/src/libs/asyncOpenURL/index.website.ts b/src/libs/asyncOpenURL/index.website.ts index b0f1872ad58b..08cb4b4109b2 100644 --- a/src/libs/asyncOpenURL/index.website.ts +++ b/src/libs/asyncOpenURL/index.website.ts @@ -1,4 +1,5 @@ import {Linking} from 'react-native'; +import Log from '@libs/Log'; import type AsyncOpenURL from './types'; /** @@ -17,7 +18,9 @@ const asyncOpenURL: AsyncOpenURL = (promise, url, shouldSkipCustomSafariLogic) = .then((params) => { Linking.openURL(typeof url === 'string' ? url : url(params)); }) - .catch(() => {}); + .catch(() => { + Log.warn('[asyncOpenURL] Promise rejected, not opening URL', {url}); + }); } else { const windowRef = window.open(); promise @@ -27,7 +30,10 @@ const asyncOpenURL: AsyncOpenURL = (promise, url, shouldSkipCustomSafariLogic) = } windowRef.location = typeof url === 'string' ? url : url(params); }) - .catch(() => windowRef?.close()); + .catch(() => { + windowRef?.close(); + Log.warn('[asyncOpenURL] Promise rejected, not opening URL', {url}); + }); } };