FuelLabs/fuel-core · error · anyhow::Error
`debug` must be enabled to use this endpoint
Error message
`debug` must be enabled to use this endpoint
What it means
Error "`debug` must be enabled to use this endpoint" thrown in FuelLabs/fuel-core.
Source
Thrown at crates/fuel-core/src/schema/block.rs:400
#[derive(Default)]
pub struct BlockMutation;
#[Object]
impl BlockMutation {
/// Sequentially produces `blocks_to_produce` blocks. The first block starts with
/// `start_timestamp`. If the block production in the [`crate::service::Config`] is
/// `Trigger::Interval { block_time }`, produces blocks with `block_time ` intervals between
/// them. The `start_timestamp` is the timestamp in seconds.
async fn produce_blocks(
&self,
ctx: &Context<'_>,
start_timestamp: Option<Tai64Timestamp>,
blocks_to_produce: U32,
) -> async_graphql::Result<U32> {
let config = ctx.data_unchecked::<GraphQLConfig>().clone();
if !config.debug {
return Err(anyhow!("`debug` must be enabled to use this endpoint").into())
}
let consensus_module = ctx.data_unchecked::<ConsensusModule>();
let start_time = start_timestamp.map(|timestamp| timestamp.0);
let blocks_to_produce: u32 = blocks_to_produce.into();
consensus_module
.manually_produce_blocks(start_time, blocks_to_produce)
.await?;
let on_chain_height = ctx.read_view()?.latest_block_height()?;
let shared_state =
ctx.data_unchecked::<graphql_api::worker_service::SharedState>();
shared_state
.block_height_subscription_handler
.subscribe()
.wait_for_block_height(on_chain_height)
.await?;View on GitHub (pinned to b9d4d170da)
When it happens
Trigger: Thrown at crates/fuel-core/src/schema/block.rs:400 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of FuelLabs/fuel-core@b9d4d170da (2026-08-16).
Data as JSON: /api/errors/2f8de106667adb89.
Report an issue: GitHub.