package errors type ErrorResponse struct { Code string `json:"code"` Message string `json:"message"` } // Define error types var ( ErrInvalidRequest = ErrorResponse{Code: "INVALID_REQUEST", Message: "Invalid request format"} ErrNotFound = ErrorResponse{Code: "NOT_FOUND", Message: "Resource not found"} ErrServerError = ErrorResponse{Code: "SERVER_ERROR", Message: "Internal server error"} ErrNoVPSAvailable = ErrorResponse{Code: "NO_VPS_AVAILABLE", Message: "No VPS available"} ) // Implement error method for ErrorResponse func (e ErrorResponse) Error() string { return e.Message }