log which URL caused an error in request_many
This commit is contained in:
parent
ebe772a5a9
commit
1ac7f2697e
1 changed files with 6 additions and 1 deletions
|
@ -223,7 +223,12 @@ def request_many(urls: typing.List[str]) -> typing.Dict[str, Response]:
|
|||
request = tornado.httpclient.HTTPRequest(url, method="GET",
|
||||
connect_timeout=2, request_timeout=2)
|
||||
|
||||
response = await client.fetch(request)
|
||||
try:
|
||||
response = await client.fetch(request)
|
||||
except:
|
||||
self.log.critical("request_many failed for %s", [url],
|
||||
exc_info=True)
|
||||
return None
|
||||
|
||||
headers = utils.CaseInsensitiveDict(dict(response.headers))
|
||||
data = response.body.decode("utf8")
|
||||
|
|
Loading…
Reference in a new issue