URL error handling improved