Skip to content

Commit

Permalink
fixed "err.response" error
Browse files Browse the repository at this point in the history
  • Loading branch information
dedanade authored Apr 2, 2021
1 parent 5c21dc1 commit 099411f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions embed-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ const res = await axios({
}
} catch (err) {
stopLoadingBtnSpinner(submitButton);
console.log(err);
alert(err.response);
if (err.response) {
alert('error', err.response.data.message);
} else alert('error', `Unable to create order, kindly retry.Thanks`);
};
};

0 comments on commit 099411f

Please sign in to comment.