migration scripts: add missing arg in recursive call (#4883)

# What this PR does
Fixes migrate 429 error handling

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
This commit is contained in:
Brandon Kauffman 2024-08-21 08:43:29 -04:00 committed by GitHub
parent 0020c22143
commit 8ed824829c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,7 +24,7 @@ def api_call(method: str, base_url: str, path: str, **kwargs) -> requests.Respon
if e.response.status_code == 429:
cooldown_seconds = int(e.response.headers["Retry-After"])
sleep(cooldown_seconds)
return api_call(method, path, **kwargs)
return api_call(method, base_url, path, **kwargs)
elif e.response.status_code == 400:
resp_json = None
with suppress(requests.exceptions.JSONDecodeError):