diff --git a/app/lib/tool/utils/pub_api_client.dart b/app/lib/tool/utils/pub_api_client.dart index 087cbd8627..20eab4c7b4 100644 --- a/app/lib/tool/utils/pub_api_client.dart +++ b/app/lib/tool/utils/pub_api_client.dart @@ -116,17 +116,18 @@ Future withRetryPubApiClient( /// The enabled experiments that will be part of the experimental cookie. Set? experiments, }) async { - final httpClient = httpClientWithAuthorization( - tokenProvider: () async => authToken, - sessionIdProvider: () async => sessionId, - csrfTokenProvider: () async => csrfToken, - cookieProvider: () async => { - if (experiments != null) experimentalCookieName: experiments.join(':'), - }, - client: http.Client(), - ); return await retry( () async { + final httpClient = httpClientWithAuthorization( + tokenProvider: () async => authToken, + sessionIdProvider: () async => sessionId, + csrfTokenProvider: () async => csrfToken, + cookieProvider: () async => { + if (experiments != null) + experimentalCookieName: experiments.join(':'), + }, + client: http.Client(), + ); try { final apiClient = PubApiClient( pubHostedUrl ?? activeConfiguration.primaryApiUri!.toString(),