refactor(httpx): drop duplicate WriteError, add WriteInternal
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"mtusi2026-messenger/internal/dto"
|
||||
"mtusi2026-messenger/internal/httpx"
|
||||
)
|
||||
|
||||
const readyPingTimeout = 2 * time.Second
|
||||
@@ -40,7 +41,7 @@ func (h *HealthHandler) Ready(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if err := h.db.Ping(ctx); err != nil {
|
||||
h.log.ErrorContext(r.Context(), "readiness check failed", "error", err)
|
||||
WriteError(
|
||||
httpx.WriteError(
|
||||
w,
|
||||
http.StatusServiceUnavailable,
|
||||
dto.ErrorCodeUnavailable,
|
||||
|
||||
Reference in New Issue
Block a user