From c6f1189418cd32ce643ff3ae978f2da23999baf5 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Fri, 5 Apr 2024 12:49:24 +0200 Subject: [PATCH] Return 404 instead of 500 when an "original parent" has been deleted (#15990) --- .../Controllers/RecycleBin/RecycleBinControllerBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Cms.Api.Management/Controllers/RecycleBin/RecycleBinControllerBase.cs b/src/Umbraco.Cms.Api.Management/Controllers/RecycleBin/RecycleBinControllerBase.cs index e26e77c405..269417871b 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/RecycleBin/RecycleBinControllerBase.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/RecycleBin/RecycleBinControllerBase.cs @@ -88,7 +88,7 @@ public abstract class RecycleBinControllerBase : ContentControllerBase .WithTitle($"The {contentType} is not trashed") .WithDetail($"The {contentType} needs to be trashed for the parent-before-recycled relation to be created.") .Build()), - RecycleBinQueryResultType.NoParentRecycleRelation => StatusCode(StatusCodes.Status500InternalServerError, problemDetailsBuilder + RecycleBinQueryResultType.NoParentRecycleRelation => NotFound(problemDetailsBuilder .WithTitle("The parent relation could not be found") .WithDetail($"The relation between the parent and the {contentType} that should have been created when the {contentType} was deleted could not be found.") .Build()),