Improve route error handling