Skip to content

Commit

Permalink
feat: ErrorCode 추가 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeong-hyeok committed Jul 28, 2023
1 parent 6cf658c commit cf3a391
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/java/com/project/mapdagu/error/ErrorCode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.project.mapdagu.error;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;


@Getter
@RequiredArgsConstructor
public enum ErrorCode {

TOKEN_NOT_EXIST(-1000, "토큰이 존재하지 않습니다.");

private final int code;
private final String message;

ErrorCode(HttpStatus code, String message) {
this.code = code.value();
this.message = message;
}
}

0 comments on commit cf3a391

Please sign in to comment.