{"record":{"id":"aa69bebf4549e459","repo":"FuelLabs/fuels-rs","slug":"is-there","errorCode":null,"errorMessage":"is there","messagePattern":"is there","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/fuels-core/src/types/tx_status.rs","lineNumber":136,"sourceCode":"    }\n\n    fn map_revert_error(\n        receipts: Arc<Vec<Receipt>>,\n        reason: &str,\n        revert_id: Option<u64>,\n        log_decoder: Option<&LogDecoder>,\n    ) -> Error {\n        if let (Some(revert_id), Some(log_decoder)) = (revert_id, log_decoder)\n            && let Some(error_detail) = log_decoder.get_error_codes(&revert_id)\n        {\n            let error_message = if error_detail.log_id.is_some() {\n                log_decoder\n                    .decode_last_log(&receipts)\n                    .unwrap_or_else(|err| {\n                        format!(\"failed to decode log from require revert: {err}\")\n                    })\n            } else {\n                error_detail.msg.clone().expect(\"is there\")\n            };\n\n            let reason = format!(\n                \"panicked at: `{}` - `{}:{}:{}` with message `{}`\",\n                error_detail.pkg,\n                error_detail.file,\n                error_detail.line,\n                error_detail.column,\n                error_message\n            );\n\n            return Error::Transaction(Reason::Failure {\n                reason,\n                revert_id: Some(revert_id),\n                receipts,\n            });\n        }\n","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/FuelLabs/fuels-rs/blob/d9a250a51818dda64bfeb5ef7cc19cf27bdcd623/packages/fuels-core/src/types/tx_status.rs#L118-L154","documentation":"While mapping a reverted transaction to an Error, if the LogDecoder's error_codes contains the revert id but the ErrorDetails carries no log_id, the SDK assumes the static message msg is present and clones it. The expect fires when the registered ErrorDetails has neither log_id nor msg, an internal invariant violation of the error metadata extracted from the contract ABI.","triggerScenarios":"A contract require! revert whose error code is registered with msg: None and log_id: None, typically because the contract binary and the ABI used for abigen! were produced by mismatched forc/SDK versions or different compilations.","commonSituations":"Contract compiled with a different forc than the one paired with the SDK; stale build artifacts (old ABI next to a new binary); mixed forc build caches.","solutions":["Clean and rebuild the contract (forc build --release) so the binary and ABI come from the same compilation, then re-run abigen!","Align forc and fuels versions per the SDK version table","Delete stale out/ directories before rebuilding","If it persists with matched versions, open an issue including the revert id and contract source"],"exampleFix":"# before: stale artifacts (ABI from an older build than the binary)\ncargo test\n\n# after: rebuild both together, then regenerate bindings\nforc build --release\n# re-run abigen! against out/release/*-abi.json\ncargo test","handlingStrategy":"validation","validationCode":"# (shell) rebuild binary + ABI from one compilation before decoding reverts\nforc build --release\n# then re-run abigen! against the fresh out/release/*-abi.json","typeGuard":null,"tryCatchPattern":"// for the normal (non-panicking) revert path, match on the structured error:\nmatch err {\n    fuels::core::types::errors::Error::Transaction(\n        fuels::core::types::errors::Reason::Failure { reason, revert_id, .. },\n    ) => {\n        eprintln!(\"revert_id={revert_id:?} reason={reason}\");\n    }\n    _ => {}\n}","preventionTips":["Delete out/ directories and rebuild contracts before regenerating bindings","Compile contracts in CI with the pinned forc version paired to the SDK","Never mix a contract binary from one build with an ABI from another","Report persistent msg/log_id gaps upstream with the revert id"],"tags":["contract","revert","panic","logging","abigen"],"backgroundTag":null,"analyzedSha":"d9a250a51818dda64bfeb5ef7cc19cf27bdcd623","analyzedAt":"2026-08-16T09:49:30.618Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}