{"record":{"id":"2f8de106667adb89","repo":"FuelLabs/fuel-core","slug":"debug-must-be-enabled-to-use-this-endpoint","errorCode":null,"errorMessage":"`debug` must be enabled to use this endpoint","messagePattern":"`debug` must be enabled to use this endpoint","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/fuel-core/src/schema/block.rs","lineNumber":400,"sourceCode":"#[derive(Default)]\npub struct BlockMutation;\n\n#[Object]\nimpl BlockMutation {\n    /// Sequentially produces `blocks_to_produce` blocks. The first block starts with\n    /// `start_timestamp`. If the block production in the [`crate::service::Config`] is\n    /// `Trigger::Interval { block_time }`, produces blocks with `block_time ` intervals between\n    /// them. The `start_timestamp` is the timestamp in seconds.\n    async fn produce_blocks(\n        &self,\n        ctx: &Context<'_>,\n        start_timestamp: Option<Tai64Timestamp>,\n        blocks_to_produce: U32,\n    ) -> async_graphql::Result<U32> {\n        let config = ctx.data_unchecked::<GraphQLConfig>().clone();\n\n        if !config.debug {\n            return Err(anyhow!(\"`debug` must be enabled to use this endpoint\").into())\n        }\n\n        let consensus_module = ctx.data_unchecked::<ConsensusModule>();\n\n        let start_time = start_timestamp.map(|timestamp| timestamp.0);\n        let blocks_to_produce: u32 = blocks_to_produce.into();\n        consensus_module\n            .manually_produce_blocks(start_time, blocks_to_produce)\n            .await?;\n\n        let on_chain_height = ctx.read_view()?.latest_block_height()?;\n        let shared_state =\n            ctx.data_unchecked::<graphql_api::worker_service::SharedState>();\n        shared_state\n            .block_height_subscription_handler\n            .subscribe()\n            .wait_for_block_height(on_chain_height)\n            .await?;","sourceCodeStart":382,"sourceCodeEnd":418,"githubUrl":"https://github.com/FuelLabs/fuel-core/blob/b9d4d170da3a31c9ace5f963d633b326348e0d42/crates/fuel-core/src/schema/block.rs#L382-L418","documentation":"Error \"`debug` must be enabled to use this endpoint\" thrown in FuelLabs/fuel-core.","triggerScenarios":"Thrown at crates/fuel-core/src/schema/block.rs:400 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b9d4d170da3a31c9ace5f963d633b326348e0d42","analyzedAt":"2026-08-16T08:56:42.692Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}