[TASK] Wrap routing exceptions

This wraps exceptions that occur when building URIs
in order to add some context to the exception message.