From 915008189228afa9cf8e712b0c7170df0ed2aeed Mon Sep 17 00:00:00 2001 From: Kwonunn Date: Thu, 20 Mar 2025 14:35:26 +0100 Subject: [PATCH] return 404 when not found --- act/artifactcache/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/act/artifactcache/handler.go b/act/artifactcache/handler.go index 0f8afd93..2da6febd 100644 --- a/act/artifactcache/handler.go +++ b/act/artifactcache/handler.go @@ -391,7 +391,7 @@ func (h *Handler) get(w http.ResponseWriter, r *http.Request, params httprouter. defer db.Close() if err := db.Get(id, cache); err != nil { if errors.Is(err, bolthold.ErrNotFound) { - h.responseJSON(w, r, 400, fmt.Errorf("cache %d: not reserved", id)) + h.responseJSON(w, r, 404, fmt.Errorf("cache %d: not reserved", id)) return } h.responseJSON(w, r, 500, err)