codestates / codestates/BanThing

[Error Handling] axios 에러

Open
#147 0 comments 0 reactions 1 assignee Claimed by @tmdqls2257 View on GitHub
client error solved
Dominant language
TypeScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

### 어떤 에러인가요?
![image](https://user-images.githubusercontent.com/54207332/155155489-fa43494c-15f2-400c-a000-aa0849fd8517.png)
![image](https://user-images.githubusercontent.com/54207332/155155849-aa949574-921d-436f-90a4-adc95822c870.png)

- 분명 로그를 찍어보면 로그가 찍히지만 vsc상에서는 에러가 발생한다.
```
$ 터미널의 에러 코드를 여기 넣어주세요.
```

### 에러 핸들링 방법
- data가 반드시 존재할 때만 log를 찍어주면 해결 되는 문제이다.
```
if (data) {
console.log(data.data);
}
```

### 에러 핸들링을 위해 참고한 레퍼런스 링크
- Memory-It 의 Error Handling 예시입니다.
[링크](https://github.com/codestates/Memory-It/issues/205)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.