From b713b324f9e16407cfe1153475742f0095bfb2ae Mon Sep 17 00:00:00 2001 From: triphora Date: Sat, 6 May 2023 10:45:29 -0400 Subject: [PATCH] Fix incorrect response to invalid input on bulk edit route (#579) --- src/routes/v2/projects.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/v2/projects.rs b/src/routes/v2/projects.rs index 0ca754df..b76b5f6d 100644 --- a/src/routes/v2/projects.rs +++ b/src/routes/v2/projects.rs @@ -1282,7 +1282,10 @@ pub async fn projects_edit( ))); } } else if project.inner.status.is_hidden() { - return Ok(HttpResponse::NotFound().body("")); + return Err(ApiError::InvalidInput(format!( + "Project {} not found", + ProjectId(project.inner.id.0 as u64) + ))); } else { return Err(ApiError::CustomAuthentication(format!( "You are not a member of project {}!",