Currently I am trying to update data from an API with Axios, which gives me an Uncaught (in promise). There is no further information in the error message
ApiAuth.js file
export async function editPasswordApi(formdata) {
try {
const data = await axios.patch(
`${URL}api/v1/user/updatePassword`,
{ ...formdata },
{
headers: { Authorization: getToken("jwt") },
},
);
return data.data;
} catch (err) {
console.log("errorlsss", err);
throw new Error(err.response.data.message);
}
}
enter image description here
New contributor
Saifullah Wardak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.