From f108043068c8818c616cc2e760f53839d4ba9b01 Mon Sep 17 00:00:00 2001 From: RanXom Date: Mon, 13 Jul 2026 17:53:46 +0530 Subject: refactor(api): return structured error responses --- internal/api/health.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'internal/api/health.go') diff --git a/internal/api/health.go b/internal/api/health.go index 61d5185..814fef5 100644 --- a/internal/api/health.go +++ b/internal/api/health.go @@ -20,10 +20,6 @@ func (s *Server) handleHealth( } if err := json.NewEncoder(w).Encode(response); err != nil { - http.Error( - w, - http.StatusText(http.StatusInternalServerError), - http.StatusInternalServerError, - ) + writeError(w, http.StatusInternalServerError, "failed to encode response") } } -- cgit v1.2.3