-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
20250202/next result type 오송민 기술블로그 제출 #119
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요 송민님! 너무 잘 읽었습니다 👍 제가 알려드린 타입으로 작성해 주셔서 저도 살짝 뿌듯하네요.. 감사합니다!
|
||
`Result<T>`를 사용하는 비동기 요청을 처리하는 함수를 정의할 차례입니다. | ||
|
||
## 기존 에러 처리 방식 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거를 Result 타입 설명 전으로 올리는 것이 저는 조금 더 자연스럽다는 생각이 들기는 하는 것 같습니다..! Result 타입 -> 기존에 에러 처리로 갑자기 이동하다보니 읽었을 때 조금 어려웠던 것 같습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존 에러 처리 -> Result type 설명 순으로 변경 했습니다! 감사합니다!
|
||
### 클라이언트 요청일 경우 | ||
|
||
클라이언트 요청에 대한 에러 메세지는 `ky`의 `beforeRequest`에서 처리해주고 있었습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
비동기 요청에 대한 에러 처리인데 HTTP 요청에 대해서만 예시가 있어서.. 요거 외에도 예시를 몇개 더 만들어 주셔도 좋을 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
비동기 요청에 대한 에러 처리인데 HTTP 요청에 대해서만 예시가 있어서.. 요거 외에도 예시를 몇개 더 만들어 주셔도 좋을 것 같습니다!
말씀해주신대로 제목을.. 변경하는 쪽으로 수정 했습니다.. 감사합니다!
|
||
### 흐름 도식화 | ||
|
||
요청의 흐름을 도식화 하면 아래와 같습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.