{"record":{"id":"ca6b3a33baa03402","repo":"nautechsystems/nautilus_trader","slug":"execution-intent-has-unknown-purpose","errorCode":null,"errorMessage":"Execution intent {} has unknown purpose {}","messagePattern":"Execution intent (.+?) has unknown purpose (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/execution/client.rs","lineNumber":1163,"sourceCode":"            return Ok(());\n        };\n        anyhow::ensure!(\n            intent.schema_version == crate::execution::transaction::EXECUTION_SCHEMA_VERSION,\n            \"Execution intent {} uses unsupported schema version {}\",\n            intent.id,\n            intent.schema_version\n        );\n\n        if intent.status == \"prepared\" {\n            database\n                .mark_execution_intent_recoverable(intent.id)\n                .await?;\n            release_preparing_slot(&self.in_flight);\n            return Ok(());\n        }\n\n        let purpose = TransactionPurpose::parse(&intent.purpose).ok_or_else(|| {\n            anyhow::anyhow!(\n                \"Execution intent {} has unknown purpose {}\",\n                intent.id,\n                intent.purpose\n            )\n        })?;\n        let nonce = intent\n            .nonce\n            .ok_or_else(|| anyhow::anyhow!(\"Active execution intent {} has no nonce\", intent.id))?;\n        *self.in_flight.lock() = Some(InFlightSlot::Recovering(RecoveryTransaction {\n            intent_id: intent.id,\n            nonce,\n            purpose,\n        }));\n        let hashes = database.get_execution_transaction_hashes(intent.id).await?;\n        let current = current_execution_hash(intent.id, &hashes)?;\n        let tx_hash = B256::from_str(&current.transaction_hash).with_context(|| {\n            format!(\n                \"Execution intent {} has invalid transaction hash {}\",","sourceCodeStart":1145,"sourceCodeEnd":1181,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/execution/client.rs#L1145-L1181","documentation":"Reconciliation guard in reconcile_unresolved_execution: the persisted execution intent's purpose string does not parse into a known TransactionPurpose, so the intent cannot be classified and recovered.","triggerScenarios":"connect() -> reconcile_unresolved_execution() calls TransactionPurpose::parse(&intent.purpose) which returns None for an active intent loaded from the database.","commonSituations":"Manual DB edits; partial migration writing new/renamed purpose values; corrupted rows; version mismatch producing an unrecognized purpose string.","solutions":["Inspect the intent row's purpose value and correct it to a valid TransactionPurpose string","Discard/complete the stale intent with the writer version that produced it","Re-run any schema migrations that normalize purpose values","Verify no external tooling writes to the execution intents table"],"exampleFix":"// before (bad row)\nintent.purpose = \"transfer_funds\";\n// after\nintent.purpose = \"transfer\"; // a value TransactionPurpose::parse accepts","handlingStrategy":"validation","validationCode":"if TransactionPurpose::parse(&intent.purpose).is_none() {\n    // repair or discard the intent row before connecting\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never hand-edit intent rows","Validate purpose values against TransactionPurpose when writing rows","Restrict DB write access to the client"],"tags":["blockchain","enum","parsing","database"],"backgroundTag":"invalid-enum-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}