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

  1. Change the `format` query parameter to exactly `text` or `json` (lowercase).
  2. Omit the `format` parameter if the handler defaults it, or check the dashboard handler docs for accepted values.
  3. 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

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


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)