(err error)
| 648 | } |
| 649 | |
| 650 | func responseWithError(err error) http.Handler { |
| 651 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 652 | log.ErrorContext(r.Context(), err) |
| 653 | render.Status(r, http.StatusInternalServerError) |
| 654 | render.JSON(w, r, newError(err.Error())) |
| 655 | }) |
| 656 | } |
| 657 | |
| 658 | func responseWithRedirect(URL *url.URL) http.Handler { |
| 659 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
no test coverage detected