Skip to content

Commit

Permalink
Create error message
Browse files Browse the repository at this point in the history
  • Loading branch information
RodriSanchez1 committed Jul 31, 2023
1 parent 41c572b commit fbdc3ea
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down

0 comments on commit fbdc3ea

Please sign in to comment.