nidus-sync/htmlpage/response.go
Eli Ribble 4c23eba5d7 Move html pages to a package
That way I can separate out HTML for the public-facing report system and
Nidus sync.
2026-01-07 15:34:09 +00:00

13 lines
308 B
Go

package htmlpage
import (
"net/http"
"github.com/rs/zerolog/log"
)
// Respond with an error that is visible to the user
func respondError(w http.ResponseWriter, m string, e error, s int) {
log.Warn().Int("status", s).Err(e).Str("user message", m).Msg("Responding with an error")
http.Error(w, m, s)
}