diff --git a/src/main/java/edu/ntnu/idatt210602/matsvinnbackend/controller/ProfileController.java b/src/main/java/edu/ntnu/idatt210602/matsvinnbackend/controller/ProfileController.java index 4f57e32f654391448fa388fa3cd19089da1c17ef..32c13a19c2dbc9cd36d62209b3a917c47a6abcd9 100644 --- a/src/main/java/edu/ntnu/idatt210602/matsvinnbackend/controller/ProfileController.java +++ b/src/main/java/edu/ntnu/idatt210602/matsvinnbackend/controller/ProfileController.java @@ -98,7 +98,7 @@ public class ProfileController { if (!listOfProfiles.isEmpty()) { logger.warn("Another profile on the current account with the same name exists."); - throw new ResponseStatusException(HttpStatus.BAD_REQUEST); + throw new ResponseStatusException(HttpStatus.CONFLICT); } else { profile.setName(request.name()); }