{"record":{"id":"1e64733e66be6f81","repo":"a-b-street/abstreet","slug":"no-transit-route-from-to-end-of-now-for-prevent-this-edit","errorCode":null,"errorMessage":"No transit route from {} to end of {} now for {}! Prevent this edit","messagePattern":"No transit route from (.+?) to end of (.+?) now for (.+?)! Prevent this edit","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"map_model/src/pathfind/walking.rs","lineNumber":410,"sourceCode":"let maybe_driving_cost = match route.route_type {\n    PathConstraints::Bus => bus_graph.pathfind(req, map).map(|p| p.get_cost()),\n    PathConstraints::Train => train_graph.pathfind(req, map).map(|p| p.get_cost()),\n    _ => unreachable!(),\n};\nif let Some(driving_cost) = maybe_driving_cost {\n    let border = map.get_i(map.get_l(l).dst_i);\n    input_graph.add_edge(\n        nodes.get(WalkingNode::RideTransit(stop1.id)),\n        nodes.get(WalkingNode::LeaveMap(border.id)),\n        round(driving_cost),\n    );\n} else {\n    panic!(\n        \"No transit route from {} to end of {} now for {}! Prevent this edit\",\n        stop1.driving_pos, l, route.long_name,\n    );\n}","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/a-b-street/abstreet/blob/0964f29315820c91b171b585eb51e300164e9197/map_model/src/pathfind/walking.rs#L392-L428","documentation":"While building the transit input graph, make_input_graph must add an edge from the route's last stop to the end border lane. If neither the bus nor train graph can path from the last stop's driving position to the end of the border lane, the route's end_border is unreachable — this fires after a map edit (e.g. removing roads) broke a transit route that previously worked, and the panic exists precisely to reject that edit.","triggerScenarios":"Thrown at map_model/src/pathfind/walking.rs:410 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reject or undo the map edit that disconnected the transit route from its end border","Adjust the route's stops so pathfinding from the final stop to the end border succeeds","Extend the route's end_border only when a driving path exists, checking with pathfind before committing the edit"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}