cube-js/cube · error
build {status} for branch {}{}
Error message
build {status} for branch {}{} What it means
This error is raised by the CLI when polling a deployment build: the build reached a terminal failure status, and the API's errorText field is surfaced (condensed to one line) as the error message. It tells the developer which branch's build failed and why, according to the control plane.
Source
Thrown at rust/cube-cli/src/commands/deployments.rs:515
return Ok(());
}
let res = wait_for_build(&api, deployment, &path, &query, timeout, poll).await?;
output::print_json(&res);
let status = util::status_of(&res, "status");
if BUILD_FAILED.contains(&status.as_str()) {
// Normalised like the two sites in `wait_for_build`, and this is the one
// that needs it most: those quote a short worker verdict, while this is a
// FAILED BUILD, so the text is a compile error that can arrive long and
// multi-line. Nothing matches against it here — the status already said
// what happened — so the raw/normalised split those sites keep for
// `contains` doesn't apply.
// `REASON_LIMIT`, not `COMPLAINT_LIMIT`: the poll labels above are
// repeated and deduped, so they must stay short — this is printed once
// and is the whole point of the message.
let error = util::one_line(&output::field(&res, "errorText"), util::REASON_LIMIT);
anyhow::bail!(
"build {status} for branch {}{}",
named_branch(&res),
// Still `is_blank` rather than `is_empty`, though `one_line` has
// already collapsed blanks to nothing: one rule at every site that
// picks an arm is cheaper to keep true than one with an exception
// whose safety depends on a call two lines up.
if util::is_blank(&error) {
String::new()
} else {
format!(": {error}")
}
);
}
}
Cmd::AdvanceStep { deployment, step } => {
let res = api
.post(
&format!("/api/v1/deployments/{deployment}/creation-step/advance"),View on GitHub (pinned to 7d981676b3)
Solutions
- Read the errorText portion of the message — it carries the build failure reason from the API
- Fix the underlying issue in the branch's project/data model and redeploy
- Re-run the build; if errorText is empty or unhelpful, check build logs in the Cube Cloud UI
Defensive patterns
Strategy: try-catch
Try / catch
try {
runBuildAndWait(branch);
} catch (e) {
const m = /build (\S+) for branch (\S+)/.exec(String(e));
if (m) { console.error(`Build ${m[1]} failed on ${m[2]}; inspect errorText`); }
else throw e;
} Prevention
- Validate the data model on the branch before triggering a build
- Treat build failure messages as carrying the API errorText — parse and surface it
- Retry builds only after addressing the reported reason
When it happens
Trigger: Running a command that waits for a deployment build to finish (e.g. `cube deployments create` or a redeploy targeting a branch) and the build ends in a failed/cancelled status.
Common situations: Broken data model committed to the branch; build infra failure; invalid creationStep configuration; transient API errors recorded as errorText by the build pipeline.
Related errors
- --branch cannot be empty when used with --wait
- --{required} is required (or provide it via --data)
- ${pkg} dependency not found. Please run this command from pr
- No app secret found
- Provided token isn't for ${dotCubeCloud.url}
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/0e07503f884ef087.
Report an issue: GitHub.