From a94c820a6aa88fdf73e87b38e8e90741c2ff7212 Mon Sep 17 00:00:00 2001 From: yagmurbrnk Date: Thu, 26 Dec 2024 00:10:36 +0300 Subject: [PATCH] AYS-415| Unsupported Media Type Error Header Changed to API ERROR --- .../ays/common/exception/handler/GlobalExceptionHandler.java | 2 +- .../common/exception/handler/GlobalExceptionHandlerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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