티스토리 뷰
1. Catch문에서 Error Status Code 받는 방법
catch(error => console.log(error))
// 단순 string만 반환된다.
Error: Request failed with status code 422
at createError (app.js:6765)
at settle (app.js:29489)
at XMLHttpRequest.handleLoad (app.js:6600)
catch(error => console.log(error.response))
// return된 object를 반환된다.
{data: 'Unauthorized', status: 401, statusText: 'Unauthorized', headers: {…}, config:
'개발일기 > ETC' 카테고리의 다른 글
프론트단에서 쿠키가 받아지지 않을 때, 해결방법 : withCredentials 설정하기 (0) | 2022.02.24 |
---|---|
[Redux] reducer에서 immer를 이용한 불변성관리 예시코드. (0) | 2022.02.22 |
HTTP 상태(응답) 코드정리 , ERROR CODE정리 (0) | 2022.02.22 |
[Redux] Redux middleware 만드는 방법 (0) | 2022.02.22 |
[Git] Git mirror , Repositiory 이동하기 ! (0) | 2022.02.20 |
댓글
250x250
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- TypeScript
- 게더타운
- 산업안전기사 실기
- zep
- 전기기사 필기
- dummydata
- 산업안전기사
- cbt
- 개더타운
- 전기기사
- 전기기기
- 게더타운맵
- shortid
- 실기CBT
- TS
- React
- 전기기사실기단답
- JavaScript
- 전기기사실기CBT
- KEC반영
- gathertown
- 산안기 합격률
- 전기산업기사
- fakerjs
- 전기공사기사
- nextjs
- 전력공학
- 전기기사필기
- 전자기학
- 모두CBT
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함