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 <c0d3b3rg@kl1pp3l.de>
This commit is contained in:
Jan Klippel 2022-11-22 21:28:00 +01:00
parent f2f943c0d8
commit dba083ac9c
No known key found for this signature in database
GPG Key ID: 685D0D9DEB945445

View File

@ -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)
}