From 997bd1b063966678a5c62d6bdc4decd13cda877a Mon Sep 17 00:00:00 2001 From: Anuruth Lertpiya Date: Sun, 5 Oct 2025 14:53:20 +0000 Subject: [PATCH] Changed status code to StatusBadRequest (400) if requested invalid model name. --- pkg/server/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/server/handlers.go b/pkg/server/handlers.go index 42634d4..8f0b509 100644 --- a/pkg/server/handlers.go +++ b/pkg/server/handlers.go @@ -207,7 +207,7 @@ func (h *Handler) GetInstance() http.HandlerFunc { inst, err := h.InstanceManager.GetInstance(name) if err != nil { - http.Error(w, "Failed to get instance: "+err.Error(), http.StatusInternalServerError) + http.Error(w, "Invalid instance: "+err.Error(), http.StatusBadRequest) return }