(rw http.ResponseWriter, err error)
| 164 | } |
| 165 | |
| 166 | func InternalServerError(rw http.ResponseWriter, err error) { |
| 167 | var details string |
| 168 | if err != nil { |
| 169 | details = err.Error() |
| 170 | } |
| 171 | |
| 172 | Write(context.Background(), rw, http.StatusInternalServerError, codersdk.Response{ |
| 173 | Message: "An internal server error occurred.", |
| 174 | Detail: details, |
| 175 | }) |
| 176 | } |
| 177 | |
| 178 | func RouteNotFound(rw http.ResponseWriter) { |
| 179 | Write(context.Background(), rw, http.StatusNotFound, codersdk.Response{ |