From f4a418a78ff88664ee3013878f7a73d63ceecc8e Mon Sep 17 00:00:00 2001 From: jinyoungchoi95 Date: Mon, 6 Sep 2021 18:25:40 +0900 Subject: [PATCH] [#43] refactor --- .../com/study/realworld/global/error/ErrorCode.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/study/realworld/global/error/ErrorCode.java b/src/main/java/com/study/realworld/global/error/ErrorCode.java index aeb38bcb..76ae9f26 100644 --- a/src/main/java/com/study/realworld/global/error/ErrorCode.java +++ b/src/main/java/com/study/realworld/global/error/ErrorCode.java @@ -4,22 +4,19 @@ public enum ErrorCode { + USER_NOT_FOUND(HttpStatus.BAD_REQUEST, "user is not found"), + EMAIL_DUPLICATION(HttpStatus.CONFLICT, "Duplicated email exists."), USERNAME_DUPLICATION(HttpStatus.CONFLICT, "Duplicated username exists."), - - USER_NOT_FOUND(HttpStatus.BAD_REQUEST, "user is not found"), + PASSWORD_DISMATCH(HttpStatus.FORBIDDEN, "password is dismatch."), INVALID_USERNAME_NULL(HttpStatus.BAD_REQUEST, "username must be provided."), INVALID_USERNAME_LENGTH(HttpStatus.BAD_REQUEST, "username length must be less then 20 characters."), INVALID_USERNAME_PATTERN(HttpStatus.BAD_REQUEST, "usernmae must be provided by limited pattern."), - INVALID_EMAIL_NULL(HttpStatus.BAD_REQUEST, "address must be provided."), INVALID_EMAIL_PATTERN(HttpStatus.BAD_REQUEST, "address must be provided by limited pattern like 'xxx@xxx.xxx'."), - INVALID_PASSWORD_NULL(HttpStatus.BAD_REQUEST, "password must be provided."), - INVALID_PASSWORD_LENGTH(HttpStatus.BAD_REQUEST, "password length must be between 6 and 20 characters."), - - PASSWORD_DISMATCH(HttpStatus.FORBIDDEN, "password is dismatch.") + INVALID_PASSWORD_LENGTH(HttpStatus.BAD_REQUEST, "password length must be between 6 and 20 characters.") ; private final HttpStatus httpStatus;