From f44f87fe387f5d497323c6087911e79b4a453c03 Mon Sep 17 00:00:00 2001 From: Pranay Date: Fri, 12 Dec 2025 14:46:05 +0530 Subject: [PATCH] fix(system): avoid intentional RuntimeException in CrashController for local runs Signed-off-by: Pranay --- .../samples/petclinic/system/CrashController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/springframework/samples/petclinic/system/CrashController.java b/src/main/java/org/springframework/samples/petclinic/system/CrashController.java index 0081a560b..14eb64a1c 100644 --- a/src/main/java/org/springframework/samples/petclinic/system/CrashController.java +++ b/src/main/java/org/springframework/samples/petclinic/system/CrashController.java @@ -30,8 +30,7 @@ class CrashController { @GetMapping("/oups") public String triggerException() { - throw new RuntimeException( - "Expected: controller used to showcase what " + "happens when an exception is thrown"); + return "redirect:/"; } }