(msg string)
| 640 | } |
| 641 | |
| 642 | func responseWithWarn(msg string) http.Handler { |
| 643 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 644 | log.WarnContext(r.Context(), msg) |
| 645 | render.Status(r, http.StatusInternalServerError) |
| 646 | render.PlainText(w, r, msg) |
| 647 | }) |
| 648 | } |
| 649 | |
| 650 | func responseWithError(err error) http.Handler { |
| 651 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |