BoundaryML/baml · error
feedback needs a title; pass --title "..." or a JSON payload
Error message
feedback needs a title; pass --title "..." or a JSON payload with a "title" field
What it means
`baml feedback` requires a non-empty title. If the --json payload's title is missing, non-string, or whitespace-only (and no --title flag supplied a value), the command rejects the payload since an untitled feedback record is useless.
Source
Thrown at baml_language/crates/baml_cli/src/feedback_command.rs:409
\"description\" are sent (attach files with --files)",
unknown.join(", ")
));
}
// Validate types, not just names: a non-string field would ship to
// PostHog while the preview and the local record (which read via
// `as_str`) silently dropped it.
for key in ["title", "description"] {
if let Some(value) = obj.get(key)
&& !value.is_string()
{
return Err(anyhow::anyhow!("feedback field \"{key}\" must be a string"));
}
}
let title = obj.get("title").and_then(Value::as_str).unwrap_or("");
if title.trim().is_empty() {
return Err(anyhow::anyhow!(
"feedback needs a title; pass --title \"...\" or a JSON payload \
with a \"title\" field"
));
}
Ok(from_json)
}
/// Shows exactly what a report contains and how it is attributed.
fn print_preview(&self, payload: &Value, identified: bool, email: Option<&str>) {
if identified {
println!(
"reporting to Boundary as {}:",
email.unwrap_or("your account")
);
} else {
println!("reporting to Boundary anonymously:");
}
println!();View on GitHub (pinned to bd85ce9dee)
Solutions
- Add --title "..." on the command line.
- Include a non-empty "title" string in the --json payload.
- If the title comes from a variable, ensure it is non-empty after trimming before invoking the command.
Example fix
# before
baml feedback --json '{"description":"crash on build"}'
# after
baml feedback --title "crash on build" --json '{"description":"stack trace follows"}' Defensive patterns
Strategy: validation
Validate before calling
# require a non-empty title before invoking
jq -e '.title != null and (.title | type == "string") and (.title | trim | length > 0)' payload.json \
&& baml feedback --json "$(cat payload.json)" \
|| { echo "title required"; exit 1; } Type guard
const hasTitle = (p) => typeof p?.title === 'string' && p.title.trim().length > 0;
Try / catch
try {
run(`baml feedback --json '${payload}'`);
} catch (e) {
if (String(e).includes('feedback needs a title')) {
run(`baml feedback --title "untitled feedback" --json '${payload}'`);
}
} Prevention
- Always pass --title or ensure the JSON payload has a non-empty title
- Trim user-supplied titles before sending
- Add a pre-flight check in scripts that build feedback payloads
When it happens
Trigger: `baml feedback --json '{"description":"x"}'` with no --title, or --json '{"title":" "}' / '{"title":""}' — obj.get("title").as_str().trim() is empty.
Common situations: Passing only a description expecting it to suffice; shell quoting stripping the title; piping JSON built from a template lacking a title field.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- unknown feedback field(s) {}; only "title" and "description"
- feedback field "{key}" must be a string
- feedback payload must be a JSON object like {"title": "..."}
- invalid Go SDK import path `{import_path}`
- project name cannot be empty
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/de9b10e332cc71cf.
Report an issue: GitHub.