The use case is meaningful. In my route editor, you add a new via point between two existing points by clicking on the line and subdividing it. This new point may be a long distance from any route. You have to move it there then. But now you have to click away the error messages for failed routing that keep popping up.
It seems that the problem is not so straightforward. In the debugger I found that the lookup of the all 3 points is successful. The queryDistance of the point in question is 292. Snapped points have been calculated for all 3 points.
I found the problem. It is the hint pass_through. When I disable the hint, I get a routing result.
Example 1: routing fails
Example 2: routing works
Experimenting brought the following results:
When pass_through is activated and the snapped point is the end point of a dead end way, GH fails the routing.
When pass_through is de-activated the same point works.
When the snapped point is on the dead end way, but not the end point, the routing works, too.
I think this is a bug. GH should accept an unavoidable U-turn at the end point as well as in the middle of a way.