diff --git a/cameleer-server-app/src/main/java/com/cameleer/server/app/controller/ApplicationConfigController.java b/cameleer-server-app/src/main/java/com/cameleer/server/app/controller/ApplicationConfigController.java index 05941123..4c037f6d 100644 --- a/cameleer-server-app/src/main/java/com/cameleer/server/app/controller/ApplicationConfigController.java +++ b/cameleer-server-app/src/main/java/com/cameleer/server/app/controller/ApplicationConfigController.java @@ -34,6 +34,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.core.Authentication; import org.springframework.web.bind.annotation.*; +import org.springframework.web.server.ResponseStatusException; import java.util.ArrayList; import java.util.List; @@ -122,7 +123,8 @@ public class ApplicationConfigController { Authentication auth, HttpServletRequest httpRequest) { if (!"staged".equalsIgnoreCase(apply) && !"live".equalsIgnoreCase(apply)) { - return ResponseEntity.status(HttpStatus.BAD_REQUEST).build(); + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, + "Unknown apply value '" + apply + "' — must be 'staged' or 'live'"); } String updatedBy = auth != null ? auth.getName() : "system";