File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,6 @@ class InterceptedClient extends BaseClient {
281
281
/// Internal method that handles the actual request with retry logic
282
282
Future <BaseResponse > _attemptRequestWithRetries (BaseRequest request,
283
283
{bool isStream = false }) async {
284
- BaseResponse response;
285
284
try {
286
285
// Intercept request
287
286
final interceptedRequest = await _interceptRequest (request);
@@ -358,7 +357,7 @@ class InterceptedClient extends BaseClient {
358
357
stream = await completer.future;
359
358
}
360
359
361
- response = isStream ? stream : await Response .fromStream (stream);
360
+ final response = isStream ? stream : await Response .fromStream (stream);
362
361
363
362
if (retryPolicy != null &&
364
363
retryPolicy! .maxRetryAttempts > _retryCount &&
@@ -368,6 +367,8 @@ class InterceptedClient extends BaseClient {
368
367
.delayRetryAttemptOnResponse (retryAttempt: _retryCount));
369
368
return _attemptRequestWithRetries (request, isStream: isStream);
370
369
}
370
+
371
+ return response;
371
372
} on Exception catch (error) {
372
373
if (retryPolicy != null &&
373
374
retryPolicy! .maxRetryAttempts > _retryCount &&
@@ -380,8 +381,6 @@ class InterceptedClient extends BaseClient {
380
381
rethrow ;
381
382
}
382
383
}
383
-
384
- return response;
385
384
}
386
385
387
386
/// This internal function intercepts the request.
You can’t perform that action at this time.
0 commit comments