axios

·React
내가 보기 위한 axios 에러 정리 새롭게 작업 들어갈 때 에러문이 필요할 때 가져다 쓰기 위한 정리 const url = "https://jsonplaceholder.typicode.com/todos"; // axios 요청 로직 axios .get(url) .then((response) => console.log(response.data)) .catch((err) => { // 오류 객체 내의 response가 존재한다 = 서버가 오류 응답을 주었다 if (err.response) { const { status, config } = err.response; // 없는 페이지 if (status === 404) { console.log(`${config.url} not found`); } // 서버 ..