diff --git a/be/src/main/java/com/secondhand/exception/GlobalExceptionHandler.java b/be/src/main/java/com/secondhand/exception/GlobalExceptionHandler.java index f9009b525..06446251f 100644 --- a/be/src/main/java/com/secondhand/exception/GlobalExceptionHandler.java +++ b/be/src/main/java/com/secondhand/exception/GlobalExceptionHandler.java @@ -24,7 +24,7 @@ public ResponseEntity loginExceptionHandler(JwtTokenExcepti public ResponseEntity handleNotFoundError(NoHandlerFoundException e) { return ResponseEntity .status(HttpStatusCode.NOT_FOUND) - .body(new CustomErrorResponse(HttpStatusCode.NOT_FOUND, e.getMessage())); + .body(new CustomErrorResponse(HttpStatusCode.METHOD_NOT_ALLOWED, e.getMessage())); } @ExceptionHandler(MethodArgumentNotValidException.class)