1. HTTP 응답 구조 (CommonResponseDto)
성공 응답
{
"success": true,
"data": {
// 실제 응답 데이터가 들어갈 자리입니다.
},
"error": null
}
에러 응답
{
"success": false,
"data": null,
"error": {
"code": "ERROR_CODE",
"message": "에러 메시지",
"status": 400
}
}
주요 속성
success
: 요청 처리 성공 여부 (boolean)
data
: 응답 데이터 (성공 시에만 존재)
error
: 에러 정보 (실패 시에만 존재)
code
: 에러 코드
message
: 에러 메시지
status
: HTTP 상태 코드
2. WebSocket 응답 구조 (WebSocketResponseDto)
성공 응답
{
"success": true,
"type": "MESSAGE_TYPE",
"data": {
// 실제 응답 데이터가 들어갈 자리입니다.
},
"error": null
}
에러 응답
{
"success": false,
"type": "ERROR",
"data": null,
"error": {
"code": "ERROR_CODE",
"message": "에러 메시지",
"status": 400
}
}
주요 속성
success
: 요청 처리 성공 여부 (boolean)
type
: 요청하는 기능 타입
data
: 응답 데이터 (성공 시에만 존재)
error
: 에러 정보 (실패 시에만 존재)
code
: 에러 코드
message
: 에러 메시지
status
: HTTP 상태 코드