Skip to content

Commit

Permalink
[#43] feat: ErrorCode 저장용 Enum 클래스 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyoungchoi95 committed Aug 31, 2021
1 parent f9e1255 commit a11a998
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.study.realworld.global.error.exception;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.http.HttpStatus;

@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ErrorCode {
;

private final HttpStatus status;
private final String code;
private final String message;

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

public HttpStatus getStatus() {
return status;
}

public String getCode() {
return code;
}

public String getMessage() {
return message;
}

}

0 comments on commit a11a998

Please sign in to comment.