a-b-street/abstreet · error
No transit route from
Error message
No transit route from {} to end of {} now for {}! Prevent this edit What it means
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.
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at map_model/src/pathfind/walking.rs:410 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of a-b-street/abstreet@0964f29315 (2026-09-13).
Data as JSON: /api/errors/1e64733e66be6f81.
Report an issue: GitHub.
Appendix: source
Thrown at map_model/src/pathfind/walking.rs:410
let maybe_driving_cost = match route.route_type {
PathConstraints::Bus => bus_graph.pathfind(req, map).map(|p| p.get_cost()),
PathConstraints::Train => train_graph.pathfind(req, map).map(|p| p.get_cost()),
_ => unreachable!(),
};
if let Some(driving_cost) = maybe_driving_cost {
let border = map.get_i(map.get_l(l).dst_i);
input_graph.add_edge(
nodes.get(WalkingNode::RideTransit(stop1.id)),
nodes.get(WalkingNode::LeaveMap(border.id)),
round(driving_cost),
);
} else {
panic!(
"No transit route from {} to end of {} now for {}! Prevent this edit",
stop1.driving_pos, l, route.long_name,
);
}View on GitHub (pinned to 0964f29315)