(w http.ResponseWriter, status int, code, message string)
| 3077 | } |
| 3078 | |
| 3079 | func writeError(w http.ResponseWriter, status int, code, message string) { |
| 3080 | writeJSON(w, status, map[string]interface{}{ |
| 3081 | "error": map[string]string{ |
| 3082 | "code": code, |
| 3083 | "message": message, |
| 3084 | }, |
| 3085 | }) |
| 3086 | } |
| 3087 | |
| 3088 | // Values of details.reason on a 403, naming which gate refused (BUG-3864). |
| 3089 | // Code and message are unchanged, so the web app and CLI read what they always |