{"record":{"id":"b8d06bd7add67266","repo":"a-b-street/abstreet","slug":"can-t-fulfill","errorCode":null,"errorMessage":"can't fulfill {}","messagePattern":"can't fulfill (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"map_model/src/map.rs","lineNumber":680,"sourceCode":"    }\n\n    pub fn pathfind(&self, req: PathRequest) -> Result<Path> {\n        self.pathfind_v2(req)?.into_v1(self)\n    }\n    pub fn pathfind_with_params(\n        &self,\n        req: PathRequest,\n        params: &RoutingParams,\n        cache_custom: PathfinderCaching,\n    ) -> Result<Path> {\n        self.pathfind_v2_with_params(req, params, cache_custom)?\n            .into_v1(self)\n    }\n    pub fn pathfind_v2(&self, req: PathRequest) -> Result<PathV2> {\n        assert!(!self.pathfinder_dirty);\n        self.pathfinder\n            .pathfind(req.clone(), self)\n            .ok_or_else(|| anyhow!(\"can't fulfill {}\", req))\n    }\n    pub fn pathfind_v2_with_params(\n        &self,\n        req: PathRequest,\n        params: &RoutingParams,\n        cache_custom: PathfinderCaching,\n    ) -> Result<PathV2> {\n        assert!(!self.pathfinder_dirty);\n        self.pathfinder\n            .pathfind_with_params(req.clone(), params, cache_custom, self)\n            .ok_or_else(|| anyhow!(\"can't fulfill {}\", req))\n    }\n    pub fn should_use_transit(\n        &self,\n        start: Position,\n        end: Position,\n    ) -> Option<(TransitStopID, Option<TransitStopID>, TransitRouteID)> {\n        assert!(!self.pathfinder_dirty);","sourceCodeStart":662,"sourceCodeEnd":698,"githubUrl":"https://github.com/a-b-street/abstreet/blob/0964f29315820c91b171b585eb51e300164e9197/map_model/src/map.rs#L662-L698","documentation":"Map::pathfind_v2 delegates to the pathfinder and unwraps its Option<PathV2>; when the pathfinder cannot produce a path for the request, this error is thrown with the request printed. It is the standard 'no route exists for this PathRequest' failure, meaning no connected sequence of lanes respecting the request's constraints links start to goal.","triggerScenarios":"Calling map.pathfind(req) (which calls pathfind_v2) where PathfinderWise::pathfind returns None: start/end positions on disconnected parts of the graph, wrong path constraints (e.g. requiring a lane type the route can't use), or a stale pathfinder (pathfinder_dirty asserted).","commonSituations":"Routing between a building and a destination with no driving/walking connectivity; bus-only trips where no transit route connects the stops; requests built against an old map after edits; filtering out roads (e.g. avoid highways) that removes all routes.","solutions":["Inspect the printed PathRequest and confirm start/goal are on connected lanes of the required type","Retry without restrictive path constraints or with different RoutingParams","Verify the map was rebuilt after edits so the pathfinder isn't stale (the assert guards this)","Check graph connectivity between the endpoints before pathfinding, e.g. via should_use_transit or reachability probes"],"exampleFix":"// before\nlet path = map.pathfind(req).ok_or(anyhow!(\"no path\"))?;\n// after\nlet path = match map.pathfind(req.clone()) {\n    Ok(p) => p,\n    Err(e) => {\n        warn!(\"no path for {:?}: {}\", req, e);\n        return None; // or fall back to a different mode\n    }\n};","handlingStrategy":"try-catch","validationCode":"// probe connectivity before pathfinding\nif map.should_use_transit(start, end).is_none() && req.end.lane().road == req.start.lane().road == false {\n    // consider checking reachability via a cheaper pathfind on a subset\n}","typeGuard":null,"tryCatchPattern":"match map.pathfind(req.clone()) {\n    Ok(p) => p,\n    Err(e) if e.to_string().starts_with(\"can't fulfill\") => {\n        warn!(\"unroutable: {}\", e);\n        fallback_route_or_cancel()\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Never assume any two positions are connected; always handle pathfinding failure","Retry with relaxed constraints (no avoid-lists) on failure","Rebuild maps after edits so the pathfinder matches the current graph","Log the full PathRequest on failure for diagnosis"],"tags":["routing","pathfinding","simulation"],"backgroundTag":"resource-not-found","analyzedSha":"0964f29315820c91b171b585eb51e300164e9197","analyzedAt":"2026-09-13T18:02:03.421Z","contentChangedAt":"2026-09-13T18:02:03.421Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}