Fix superflous header, other minor bugs

This commit is contained in:
Mukhtar Akere
2025-07-21 20:35:49 +01:00
parent afe577bf2f
commit 3d2fcf5656
6 changed files with 47 additions and 6 deletions

View File

@@ -474,6 +474,7 @@ func (h *Handler) handleGet(w http.ResponseWriter, r *http.Request) {
if streamErr.StatusCode > 0 && !hasHeadersWritten(w) {
http.Error(w, streamErr.Error(), streamErr.StatusCode)
return
} else {
h.logger.Error().
Err(streamErr.Err).
@@ -484,6 +485,7 @@ func (h *Handler) handleGet(w http.ResponseWriter, r *http.Request) {
// Generic error
if !hasHeadersWritten(w) {
http.Error(w, "Stream error", http.StatusInternalServerError)
return
} else {
h.logger.Error().
Err(err).