{"record":{"id":"4a3cbf3d5ed3fc4c","repo":"BoundaryML/baml","slug":"internal-error-0","errorCode":null,"errorMessage":"Internal error: {0}","messagePattern":"Internal error: (.+?)","errorType":"exception","errorClass":"BridgeError","httpStatus":null,"severity":"critical","filePath":"baml_language/crates/bridge_cffi/src/error.rs","lineNumber":43,"sourceCode":"    #[error(\"type arguments are not supported when invoking a BAML function handle\")]\n    FunctionHandleTypeArgs,\n\n    #[error(\"Function not found: {name}\")]\n    FunctionNotFound { name: String },\n\n    #[error(\"Missing argument '{parameter}' for function '{function}'\")]\n    MissingArgument { function: String, parameter: String },\n\n    #[error(\"Not implemented: {0}\")]\n    NotImplemented(String),\n\n    #[error(\"call_id {0} is already in use by an active call\")]\n    DuplicateCallId(u64),\n\n    #[error(\"call_id must be a nonzero uint64\")]\n    InvalidCallId,\n\n    #[error(\"Internal error: {0}\")]\n    Internal(String),\n\n    #[error(\"{0}\")]\n    Startup(String),\n}\n","sourceCodeStart":25,"sourceCodeEnd":49,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/bridge_cffi/src/error.rs#L25-L49","documentation":"BridgeError::Internal wraps an unexpected internal failure message. It marks bugs or unreachable states in the bridge itself — invariant violations, unexpected engine responses, or wrapped low-level failures — rather than caller mistakes.","triggerScenarios":"Any bridge code path hitting an unexpected condition it formats as Internal(msg); typically engine internals returning data the bridge cannot interpret or a panic-recovered state.","commonSituations":"Version mismatch between the native bridge and the client SDK; corrupted runtime state after a failed init; genuine bugs in bridge_cffi.","solutions":["Capture the full wrapped message and report it upstream (BAML issue tracker) — it usually indicates a bug.","Re-initialize the runtime (recreate the engine) to clear possibly corrupted state.","Ensure bridge_cffi native library and client SDK versions match.","Retry once after a clean re-init only if the message suggests transient state."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = bridge.operation(...)\nexcept BridgeError as e:\n    if 'Internal error' in str(e):\n        log.error(e)  # report upstream; re-init engine\n        runtime = recreate_runtime()","preventionTips":["Keep native bridge and SDK versions matched","Recreate the runtime after failures instead of continuing","Report every occurrence with the wrapped message upstream"],"tags":["ffi","internal","bug"],"backgroundTag":"internal-invariant-violation","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}