cara menangani kesalahan Axios JS
axios.post("/api/end", {data : "xx"})
.then(({ data }) => {
// doing something with success
})
.catch((err) => {
let message = typeof err.response !== "undefined" ? err.response.data.message : err.message;
console.warn("error", message);
});
Indonesia People