From dba083ac9c256b8b84a159856cf016a5fbf0d4be Mon Sep 17 00:00:00 2001 From: Jan Klippel Date: Tue, 22 Nov 2022 21:28:00 +0100 Subject: [PATCH] Return a 404 if there is no repository If no repository is found the user expects a 404 status code instead of a dependency failed status code (as it was before). Signed-off-by: Jan Klippel --- server/handler/handler_sub_domain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/handler/handler_sub_domain.go b/server/handler/handler_sub_domain.go index 1d769d4..2a75e9f 100644 --- a/server/handler/handler_sub_domain.go +++ b/server/handler/handler_sub_domain.go @@ -115,6 +115,6 @@ func handleSubDomain(log zerolog.Logger, ctx *context.Context, giteaClient *gite // Couldn't find a valid repo/branch html.ReturnErrorPage(ctx, - fmt.Sprintf("couldn't find a valid repo[%s]", targetRepo), - http.StatusFailedDependency) + fmt.Sprintf("could not find a valid repository[%s]", targetRepo), + http.StatusNotFound) }