NCBACK-9 add login
Test Workflow / test (push) Successful in 4s

This commit is contained in:
vladp
2025-12-10 04:51:07 +07:00
parent b5b8bebb69
commit 8a33bd33a2
6 changed files with 34 additions and 54 deletions
@@ -8,10 +8,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import ru.soune.no_copy.dto.MessageCode;
import ru.soune.no_copy.exception.*;
import java.time.LocalDateTime;
import java.util.Map;
@RestControllerAdvice
@@ -31,9 +29,9 @@ public class GlobalExceptionHandler {
"message" ,message));
}
@ExceptionHandler(UserAlreadyExistsException.class)
@ExceptionHandler(NotValidFieldException.class)
@ResponseStatus(HttpStatus.OK)
public ResponseEntity<?> handleUserContainsException(UserAlreadyExistsException ex) {
public ResponseEntity<?> handleUserContainsException(NotValidFieldException ex) {
return ResponseEntity
.ok()