From fbdc3eaa82010837551d0b6a233c823862b3efdd Mon Sep 17 00:00:00 2001 From: Rodri Sanchez Date: Mon, 31 Jul 2023 20:17:10 -0300 Subject: [PATCH] Create error message --- .../SubscriptionProvider/SubscriptionProvider.actions.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/providers/SubscriptionProvider/SubscriptionProvider.actions.js b/src/providers/SubscriptionProvider/SubscriptionProvider.actions.js index b4d9e2f68..2b0c8bca2 100644 --- a/src/providers/SubscriptionProvider/SubscriptionProvider.actions.js +++ b/src/providers/SubscriptionProvider/SubscriptionProvider.actions.js @@ -138,7 +138,13 @@ export function updateIsSubscribed(requestOrigin = 'unkwnown') { ); } } catch (err) { - console.error(err.message + '.', err.error); + const errorMessage = + err.message + + '. ' + + (err.response ? err.response?.data?.message : err.error); + + console.error(errorMessage); + isSubscribed = false; status = NOT_SUBSCRIBED; let ownedProduct = '';