{"record":{"id":"cae7bddfbc1788de","repo":"influxdata/influxdb","slug":"not-found-0","errorCode":null,"errorMessage":"not found: {0}","messagePattern":"not found: (.+?)","errorType":"http","errorClass":"Error::NoHandler","httpStatus":null,"severity":"error","filePath":"core/iox_v1_query_api/src/error.rs","lineNumber":19,"sourceCode":"use std::fmt::Debug;\n\nuse datafusion::error::DataFusionError;\nuse iox_query_influxql_rewrite as rewrite;\nuse thiserror::Error;\n\n/// Error type for the v1 API\n///\n/// This is used to catch errors that occur during the streaming process.\n/// [`anyhow::Error`] is used as a catch-all because if anything fails during\n/// that process it will result in a 500 INTERNAL ERROR.\n#[derive(Debug, thiserror::Error)]\n#[error(\"unexpected query error: {0}\")]\npub struct QueryError(#[from] pub anyhow::Error);\n\n#[derive(Debug, Error)]\npub enum Error {\n    /// The requested path has no registered handler.\n    #[error(\"not found: {0}\")]\n    NoHandler(String),\n\n    #[error(\"authorization failure: {0}\")]\n    AuthorizationFailure(String),\n\n    #[error(\"invalid mime type ({0})\")]\n    InvalidMimeType(String),\n\n    /// Missing parameters for query\n    #[error(\"missing query parameters 'db' and 'q'\")]\n    MissingQueryParams,\n\n    #[error(\"error decoding multipart file upload: {0}\")]\n    MultipartFile(String),\n\n    #[error(\"Invalid UTF8: {message} {error}\")]\n    Utf8 {\n        message: &'static str,","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/core/iox_v1_query_api/src/error.rs#L1-L37","documentation":"`Error::NoHandler(String)` from `iox_v1_query_api` indicates the HTTP request path has no registered handler. The API router throws it when a request arrives for a route that was never registered, and includes the offending path in the message.","triggerScenarios":"Sending an HTTP request to a path that is not one of the registered v1 query API endpoints (e.g. GET /query2, typos like /querie, or disabled features whose routes were never mounted).","commonSituations":"Client pointed at the wrong server type (query API instead of write API), API version changes renaming routes, or a proxy stripping/adding path prefixes.","solutions":["Check the request URL path against the documented v1 API endpoints (`/query`, `/write`, etc.).","Verify HTTP method matches the route — some handlers register per-method only.","Confirm the server binary actually registers the handler for that path (feature flags may omit routes)."],"exampleFix":"// before\nGET http://host:8086/query2?db=db0&q=...\n// after\nGET http://host:8086/query?db=db0&q=...","handlingStrategy":"validation","validationCode":"const KNOWN_PATHS: &[&str] = &[\"/query\", \"/write\", \"/health\"];\nfn path_is_supported(path: &str) -> bool {\n    KNOWN_PATHS.iter().any(|p| path.starts_with(p))\n}","typeGuard":"fn as_no_handler(e: &iox_v1_query_api::Error) -> Option<&str> {\n    match e { iox_v1_query_api::Error::NoHandler(p) => Some(p), _ => None }\n}","tryCatchPattern":"match client.get(url).send().await {\n    Ok(r) if r.status().as_u16() == 404 => eprintln!(\"check URL: path not registered\"),\n    Ok(r) => handle(r).await,\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Pin endpoint paths in a constants module shared by all clients instead of ad-hoc strings.","Re-read API docs after upgrading server versions — routes may change.","Add an integration smoke test hitting each documented route."],"tags":["rust","http-api","routing","not-found","thiserror"],"backgroundTag":"resource-not-found","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}