diff options
| author | RanXom <saiyedshizain@gmail.com> | 2026-07-13 17:53:46 +0530 |
|---|---|---|
| committer | RanXom <saiyedshizain@gmail.com> | 2026-07-13 17:53:46 +0530 |
| commit | f108043068c8818c616cc2e760f53839d4ba9b01 (patch) | |
| tree | 01dce4dbdfd531f3eb60c920c3232c8bbafd43f4 /internal/api/health.go | |
| parent | d87995c3629cac4671b05073915214f45d0c7112 (diff) | |
| download | galleryd-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.go | 6 |
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") } } |