Improve uriunsplit error handling