nidus-sync/sync/template.go

14 lines
320 B
Go
Raw Normal View History

package sync
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 from sync pages")
http.Error(w, m, s)
}