---
# System prepended metadata

title: Untitled

---

- 로그 정보

FE

Error 
```
{
    code: {http stauts code}
    error: {
        type: "toast"|"alert"
        message : "OO을 불러오는것을 실패했어요"
    }
}
```

BE
- 그외의 api 호출에 대해 모두 로그를 남긴다.
- 400 번대, 500번대 에러는 로그를 남긴다.
```
기본적으로 sentry 에서 잡아주는 정보 외에 추가 정보가 필요하면 추가한다

{
    where 정보 -> 
    http:{
        code: 
        method: "POST/GET/PATCH/DELTE"
        header:
        url:
    }
    what, why, how 정보 -> error 객체
    error: {
        cause: {exception case}
        stackTrace: {...}
        userID: 26
        message : "OO을 불러오는것을 실패했어요"
    }
    when -> time 정보 기록
    who -> host 와 userID 기록
}
```
"[date] :: JSON.stringify(Error) ::"

- 에러 내려주기


400 Bad Request
The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).


401 Unauthorized
Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.

402 Payment Required Experimental
This response code is reserved for future use. The initial aim for creating this code was using it for digital payment systems, however this status code is used very rarely and no standard convention exists.


403 Forbidden
The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.


404 Not Found


500 Internal Server Error
The server has encountered a situation it does not know how to handle.

502 Bad Gateway
This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.

