(w http.ResponseWriter, status int, message string, details interface{})
| 350 | } |
| 351 | |
| 352 | func writeJSONError(w http.ResponseWriter, status int, message string, details interface{}) { |
| 353 | w.Header().Set("Content-Type", "application/json") |
| 354 | w.WriteHeader(status) |
| 355 | json.NewEncoder(w).Encode(ErrorResponse{ |
| 356 | Error: message, |
| 357 | Details: details, |
| 358 | }) |
| 359 | } |
| 360 | |
| 361 | // StartRequest is the request body for the /start endpoint. |
| 362 | type StartRequest struct { |
no test coverage detected