aboutsummaryrefslogtreecommitdiff
path: root/internal/api/health.go
diff options
context:
space:
mode:
authorRanXom <saiyedshizain@gmail.com>2026-07-13 17:53:46 +0530
committerRanXom <saiyedshizain@gmail.com>2026-07-13 17:53:46 +0530
commitf108043068c8818c616cc2e760f53839d4ba9b01 (patch)
tree01dce4dbdfd531f3eb60c920c3232c8bbafd43f4 /internal/api/health.go
parentd87995c3629cac4671b05073915214f45d0c7112 (diff)
downloadgalleryd-f108043068c8818c616cc2e760f53839d4ba9b01.tar.xz
galleryd-f108043068c8818c616cc2e760f53839d4ba9b01.zip
refactor(api): return structured error responses
Diffstat (limited to 'internal/api/health.go')
-rw-r--r--internal/api/health.go6
1 files changed, 1 insertions, 5 deletions
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")
}
}