(w http.ResponseWriter, status int, code, message string)
| 1899 | } |
| 1900 | |
| 1901 | func writeError(w http.ResponseWriter, status int, code, message string) { |
| 1902 | writeJSON(w, status, map[string]interface{}{ |
| 1903 | "error": map[string]string{ |
| 1904 | "code": code, |
| 1905 | "message": message, |
| 1906 | }, |
| 1907 | }) |
| 1908 | } |
| 1909 | |
| 1910 | // writeInternalError logs the real error server-side and sends a generic |
| 1911 | // message to the client. This prevents leaking SQL errors, file paths, |
no test coverage detected