Skip to content

Commit

Permalink
inline variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ueman committed Oct 18, 2023
1 parent 6883402 commit 69a961d
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions dio/lib/src/dio_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,18 @@ class DioException implements Exception {
required Duration timeout,
required RequestOptions requestOptions,
Object? error,
}) {
final message = 'The request connection took longer than $timeout '
'and it was aborted. '
'To get rid of this exception, try raising the '
'RequestOptions.connectTimeout above the duration of $timeout or '
'improve the response time of the server.';
return DioException(
type: DioExceptionType.connectionTimeout,
message: message,
requestOptions: requestOptions,
response: null,
error: error,
);
}
}) =>
DioException(
type: DioExceptionType.connectionTimeout,
message: 'The request connection took longer than $timeout '
'and it was aborted. '
'To get rid of this exception, try raising the '
'RequestOptions.connectTimeout above the duration of $timeout or '
'improve the response time of the server.',
requestOptions: requestOptions,
response: null,
error: error,
);

factory DioException.sendTimeout({
required Duration timeout,
Expand Down

0 comments on commit 69a961d

Please sign in to comment.