wcs: log correct URL on errors (#29367)
This commit is contained in:
parent
dadad025a6
commit
9e3fd0a1f2
|
@ -207,6 +207,7 @@ class WcsBlurpMixin(object):
|
|||
|
||||
wcs_sites = copy.deepcopy(wcs_sites)
|
||||
returns = set([])
|
||||
api_url = self.get_api_url(context)
|
||||
for wcs_slug, wcs_site in wcs_sites.items():
|
||||
url = wcs_site.get('url')
|
||||
if not url.endswith('/'):
|
||||
|
@ -215,7 +216,7 @@ class WcsBlurpMixin(object):
|
|||
wcs_site['slug'] = wcs_slug
|
||||
|
||||
response = requests.get(
|
||||
self.get_api_url(context),
|
||||
api_url,
|
||||
remote_service=wcs_site,
|
||||
user=getattr(context.get('request'), 'user', None),
|
||||
cache_duration=self.cache_duration,
|
||||
|
@ -237,7 +238,7 @@ class WcsBlurpMixin(object):
|
|||
item['site_slug'] = wcs_slug
|
||||
|
||||
if not 200 in returns: # not a single valid answer
|
||||
logging.error('failed to get data from any %s (%r)', self.api_url, returns)
|
||||
logging.error('failed to get data from any %s (%r)', api_url, returns)
|
||||
|
||||
return wcs_sites
|
||||
|
||||
|
|
Loading…
Reference in New Issue