[BUGFIX beta] Better error message for rejected routes.

Closes #4691.