This commit is contained in:
2026-01-27 19:14:12 +11:00
parent e47619abd4
commit b25906b115
15 changed files with 138 additions and 314 deletions

View File

@@ -42,6 +42,17 @@ func throwInternalServiceError(
throwError(s, w, r, http.StatusInternalServerError, msg, err, "error")
}
// throwServiceUnavailable handles 503 errors
func throwServiceUnavailable(
s *hws.Server,
w http.ResponseWriter,
r *http.Request,
msg string,
err error,
) {
throwError(s, w, r, http.StatusServiceUnavailable, msg, err, "error")
}
// throwBadRequest handles 400 errors (malformed requests)
func throwBadRequest(
s *hws.Server,