FuelLabs/fuel-core · error · anyhow::Error
Invalid order
Error message
Invalid order
What it means
Parse guard in get_topic(): the topic's "order" field, fetched from the sequencer's /topic/{id_b64} REST endpoint, failed to parse into the expected numeric/typed order value. The API returned 200 and the JSON deserialized into TopicResponse, but the order string is not in the representable format (e.g. non-numeric, empty, or out-of-range), so .parse() returned Err and it is mapped to this sentinel error.
Source
Thrown at crates/services/shared-sequencer/src/http_api.rs:311
let path = format!("/fuelsequencer/sequencing/v1/topic/{id_b64}");
let full_url = Url::parse(api_url)?.join(&path).unwrap();
let r = http.get(full_url).send().await?;
if r.status() == 404 {
return Ok(None);
}
let text = r.text().await?;
let resp: api_types::TopicResponse =
serde_json::from_str(&text).with_context(|| format!("response text {text}"))?;
let owner = resp
.topic
.owner
.parse()
.map_err(|_| anyhow::anyhow!("Invalid owner"))?;
let order = resp
.topic
.order
.parse()
.map_err(|_| anyhow::anyhow!("Invalid order"))?;
Ok(Some(TopicInfo { owner, order }))
}
#[cfg(test)]
mod tests {
use super::*;
use mockito::Matcher;
use serde_json::json;
#[tokio::test]
async fn latest_block_height_uses_tendermint_json_rpc_shape() {
let mut server = mockito::Server::new_async().await;
let mock = server
.mock("POST", "/")
.match_body(Matcher::Json(json!({
"jsonrpc": "2.0",
"id": 1,
"method": "abci_info",View on GitHub (pinned to add100d30d)
Solutions
- Log the raw resp.topic.order string to see the exact unparseable value
- Check for API version mismatch between the shared-sequencer topic endpoint and this client's expected order format
- If order can legitimately be absent/unknown, parse into an Option and default instead of failing the whole get_topic call
- Validate topic registration data upstream so only well-formed order values are stored
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/services/shared-sequencer/src/http_api.rs:311 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of FuelLabs/fuel-core@add100d30d (2026-09-05).
Data as JSON: /api/errors/8ccdd24d756f602d.
Report an issue: GitHub.