(w http.ResponseWriter, status int, code, message string)
| 2984 | } |
| 2985 | |
| 2986 | func writeError(w http.ResponseWriter, status int, code, message string) { |
| 2987 | writeJSON(w, status, map[string]interface{}{ |
| 2988 | "error": map[string]string{ |
| 2989 | "code": code, |
| 2990 | "message": message, |
| 2991 | }, |
| 2992 | }) |
| 2993 | } |
| 2994 | |
| 2995 | // Values of details.reason on a 403, naming which gate refused (BUG-3864). |
| 2996 | // Code and message are unchanged, so the web app and CLI read what they always |
no test coverage detected