From b9aef4156fbbd215df1b038e8ed3fecbe76f33d2 Mon Sep 17 00:00:00 2001 From: Noe Alejandro Perez Dominguez <6936336+osocron@users.noreply.github.com> Date: Mon, 8 May 2023 08:31:55 +0200 Subject: [PATCH] Allow client requests to be retried (#11464) This is regarding: https://github.com/psf/requests/issues/4664 The change allows errors to be handled and retried. Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com> --- ingestion/src/metadata/ingestion/ometa/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ingestion/src/metadata/ingestion/ometa/client.py b/ingestion/src/metadata/ingestion/ometa/client.py index 2a610f5befc..53b109ffb52 100644 --- a/ingestion/src/metadata/ingestion/ometa/client.py +++ b/ingestion/src/metadata/ingestion/ometa/client.py @@ -216,8 +216,8 @@ class REST: Returns the body json in the 200 status. """ retry_codes = self._retry_codes - resp = self._session.request(method, url, **opts) try: + resp = self._session.request(method, url, **opts) resp.raise_for_status() except HTTPError as http_error: # retry if we hit Rate Limit