(w http.ResponseWriter, status int, code, message string)
| 1844 | } |
| 1845 | |
| 1846 | func writeError(w http.ResponseWriter, status int, code, message string) { |
| 1847 | writeJSON(w, status, map[string]interface{}{ |
| 1848 | "error": map[string]string{ |
| 1849 | "code": code, |
| 1850 | "message": message, |
| 1851 | }, |
| 1852 | }) |
| 1853 | } |
| 1854 | |
| 1855 | // writeInternalError logs the real error server-side and sends a generic |
| 1856 | // message to the client. This prevents leaking SQL errors, file paths, |
no test coverage detected