From 7b5dc5afba85dffc00559be722a20f36eb5231be Mon Sep 17 00:00:00 2001 From: cfisher-scottlogic Date: Thu, 5 Oct 2023 20:46:43 +0100 Subject: [PATCH] VUU25: Make deleteLayout generate 404 if layout does not exist (backend) --- .../org/finos/vuu/layoutserver/controller/LayoutController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layout-server/src/main/java/org/finos/vuu/layoutserver/controller/LayoutController.java b/layout-server/src/main/java/org/finos/vuu/layoutserver/controller/LayoutController.java index 90068d5fd..cdf67d3b3 100644 --- a/layout-server/src/main/java/org/finos/vuu/layoutserver/controller/LayoutController.java +++ b/layout-server/src/main/java/org/finos/vuu/layoutserver/controller/LayoutController.java @@ -98,6 +98,8 @@ public void updateLayout(@PathVariable UUID id, @RequestBody @Valid LayoutReques @ResponseStatus(HttpStatus.NO_CONTENT) @DeleteMapping("/{id}") public void deleteLayout(@PathVariable UUID id) { + // Generate a 404 if layout doesn't exist + layoutService.getLayout(id); layoutService.deleteLayout(id); } }