risingwavelabs/risingwave · warning · DashboardError
Unsupported format ` `, only `text` and `json` are…
Error message
Unsupported format `{}`, only `text` and `json` are supported for now What it means
The dashboard HTTP API's `actor_traces_format` query helper parses the `format` parameter into an ActorTracesFormat enum. Only the literal strings `text` and `json` are accepted; any other value causes this error. It protects the trace-reporting endpoint from unrecognized serialization formats.
Solutions
- Change the `format` query parameter to exactly `text` or `json` (lowercase).
- Omit the `format` parameter if the handler defaults it, or check the dashboard handler docs for accepted values.
- If a new format is genuinely needed, extend the match in src/meta/src/dashboard/mod.rs actor_traces_format and rebuild the meta node.
Example fix
// before curl 'http://localhost:5691/api/v1/actor_traces?format=pretty' // after curl 'http://localhost:5691/api/v1/actor_traces?format=json'
Defensive patterns
Strategy: validation
Validate before calling
const f = new URLSearchParams({ format: 'json' });
if (!['text', 'json'].includes(f.get('format'))) throw new Error("format must be 'text' or 'json'");
const url = `http://localhost:5691/api/v1/actor_traces?${f}`; Type guard
function isActorTracesFormat(v) { return v === 'text' || v === 'json'; } Try / catch
try { const res = await fetch(url); if (!res.ok) throw new Error(await res.text()); } catch (e) { /* check for 'Unsupported format' and fix the param */ } Prevention
- Always pass the format parameter lowercase from a fixed constant, not free-form config.
- Validate user-supplied format strings against ['text','json'] before building the URL.
When it happens
Trigger: Calling GET /api/v1/actor_traces (or any handler invoking Service::actor_traces_format) with a `format` query parameter other than `text` or `json`, e.g. `format=txt`, `format=TEXT`, or `format=protobuf`.
Common situations: Scripts or dashboards passing capitalized or abbreviated format names; clients copying a format string from another API (e.g. `pretty` or `yaml`); typos in monitoring tooling that scrapes the RisingWave dashboard.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unsupported actor_traces_format
- CPU profiling duration must be greater than zero
- duplicate worker id in plan, prev ->
- exactly one of job_id or fragment_id must be provided
- get none metadata in commit response for coordinated sink…
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/10f4a605cfa4ab1a.
Report an issue: GitHub.
Appendix: source
Thrown at src/meta/src/dashboard/mod.rs:484
.collect();
Ok(Json(result))
}
#[derive(Debug, Deserialize)]
pub struct AwaitTreeDumpParams {
#[serde(default = "await_tree_default_format")]
format: String,
}
impl AwaitTreeDumpParams {
/// Parse the `format` parameter to [`ActorTracesFormat`].
pub fn actor_traces_format(&self) -> Result<ActorTracesFormat> {
Ok(match self.format.as_str() {
"text" => ActorTracesFormat::Text,
"json" => ActorTracesFormat::Json,
_ => {
return Err(err(anyhow!(
"Unsupported format `{}`, only `text` and `json` are supported for now",
self.format
)));
}
})
}
}
fn await_tree_default_format() -> String {
// In dashboard, await tree is usually for engineer to debug, so we use human-readable text format by default here.
"text".to_owned()
}
pub async fn dump_await_tree_all(
Query(params): Query<AwaitTreeDumpParams>,
Extension(srv): Extension<Service>,
) -> Result<Json<StackTraceResponse>> {
let actor_traces_format = params.actor_traces_format()?;View on GitHub (pinned to 6469eb736d)