wrapping http.request to log the URL with errors