diff --git a/src/main/java/org/ays/common/exception/handler/GlobalExceptionHandler.java b/src/main/java/org/ays/common/exception/handler/GlobalExceptionHandler.java index 10f144900..0695e2dcf 100644 --- a/src/main/java/org/ays/common/exception/handler/GlobalExceptionHandler.java +++ b/src/main/java/org/ays/common/exception/handler/GlobalExceptionHandler.java @@ -190,7 +190,7 @@ AysErrorResponse handleHttpMediaTypeNotSupportedException(HttpMediaTypeNotSuppor log.error(exception.getMessage(), exception); return AysErrorResponse.builder() - .header(AysErrorResponse.Header.VALIDATION_ERROR.getName()) + .header(AysErrorResponse.Header.API_ERROR.getName()) .build(); } diff --git a/src/test/java/org/ays/common/exception/handler/GlobalExceptionHandlerTest.java b/src/test/java/org/ays/common/exception/handler/GlobalExceptionHandlerTest.java index 5a6c445f0..797a28028 100644 --- a/src/test/java/org/ays/common/exception/handler/GlobalExceptionHandlerTest.java +++ b/src/test/java/org/ays/common/exception/handler/GlobalExceptionHandlerTest.java @@ -274,7 +274,7 @@ void givenUnsupportedMediaType_whenThrowHttpMediaTypeNotSupportedException_thenR // When AysErrorResponse mockErrorResponse = AysErrorResponse.builder() - .header(AysErrorResponse.Header.VALIDATION_ERROR.getName()) + .header(AysErrorResponse.Header.API_ERROR.getName()) .build(); // Then