Something went wrong. Try again.
Simple homelab monitoring service
Something went wrong. Try again.
1234567891011121314151617181920212223242526package web
import ( "net/http")
// serverError logs an error and returns an Internal Server Error// response.func (a *app) serverError(w http.ResponseWriter, r *http.Request, err error) { a.logger.Error(err.Error(), "uri", r.URL.RequestURI(), "method", r.Method) clientError(w, http.StatusInternalServerError)}
// clientError returns the supplied error status to the client.func clientError(w http.ResponseWriter, status int) { http.Error(w, http.StatusText(status), status)}
// notFound returns a Not Found error response.//nolint:unusedfunc (a *app) notFoundError(w http.ResponseWriter) { clientError(w, http.StatusNotFound)}