{"record":{"id":"df30392425368dd0","repo":"vllm-project/vllm","slug":"engine-core-error","errorCode":null,"errorMessage":"engine-core error","messagePattern":"engine-core error","errorType":"exception","errorClass":"vllm_llm::Error","httpStatus":null,"severity":"error","filePath":"rust/src/llm/src/error.rs","lineNumber":13,"sourceCode":"// SPDX-License-Identifier: Apache-2.0\n// SPDX-FileCopyrightText: Copyright contributors to the vLLM project\n\nuse thiserror::Error;\n\npub type Result<T> = std::result::Result<T, Error>;\n\n/// Public error type for the Rust `llm` facade.\n#[derive(Debug, Error)]\npub enum Error {\n    #[error(\"generate request `{request_id}` has an empty prompt_token_ids\")]\n    EmptyPromptTokenIds { request_id: String },\n    #[error(\"engine-core error\")]\n    EngineCoreClient(#[from] vllm_engine_core_client::Error),\n}\n","sourceCodeStart":1,"sourceCodeEnd":16,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/rust/src/llm/src/error.rs#L1-L16","documentation":"llm::Error::EngineCoreClient is a transparent wrapper (#[from]) around vllm_engine_core_client::Error, displayed simply as \"engine-core error\". Any failure raised by the underlying client layer — closed channels, duplicate request IDs, utility call failures, engine crashes — surfaces through this variant in the public LLM API.","triggerScenarios":"Any LLM facade call (generate, shutdown, utilities) where the engine-core client returns an error: engine process death, channel closure, duplicate request_id, DP rank issues, or utility call failures.","commonSituations":"Users of the high-level Rust llm crate seeing a generic engine-core error; the specific cause is only visible by matching the inner error variant or its Display text.","solutions":["Match or print the inner EngineCoreClient error (`err.to_string()` / downcast) to identify the actual variant","Apply the fix corresponding to the inner error (see ControlClosed, DispatcherClosed, DuplicateRequestId, etc.)","Enable debug logging on vllm_engine_core_client for the full error chain"],"exampleFix":"// before\nmatch llm.generate(req).await { Err(e) => log::error!(\"failed: {e}\"), .. }\n\n// after\nmatch llm.generate(req).await {\n    Err(e) => match e {\n        llm::Error::EngineCoreClient(inner) => log::error!(\"engine-core: {inner:?}\"),\n        other => log::error!(\"other: {other}\"),\n    },\n    ..\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn is_engine_core(e: &vllm_llm::Error) -> bool {\n    matches!(e, vllm_llm::Error::EngineCoreClient(_))\n}","tryCatchPattern":"match llm.generate(req).await {\n    Err(vllm_llm::Error::EngineCoreClient(inner)) => {\n        tracing::error!(\"engine-core failure: {inner}\"); // inner Display names the real variant\n        Err(vllm_llm::Error::EngineCoreClient(inner))\n    }\n    Err(e) => Err(e),\n    Ok(v) => Ok(v),\n}","preventionTips":["Always inspect the inner EngineCoreClient error instead of branching on the generic wrapper text","Log the full error chain ({e:#} with anyhow) to preserve the cause","Centralize the match on inner variants so retry/recovery policy lives in one place"],"tags":["wrapper","engine-core","error-chaining","rust"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}