Skip to content

Commit

Permalink
docs: extend doc comment for onRequestError callback
Browse files Browse the repository at this point in the history
  • Loading branch information
devj3ns committed Oct 12, 2024
1 parent c22504d commit d659ee6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class RestOfflineQueueClient extends http.BaseClient {
void Function(http.Request request, http.StreamedResponse response)? onReattemptableResponse;

/// A callback triggered when a request throws an exception during execution.
///
/// `SocketException`s (errors thrown due to missing connectivity) will also be forwarded to this callback.
void Function(http.Request request, Object error)? onRequestError;

/// If the response returned from the client is one of these error codes, the request
Expand Down Expand Up @@ -118,7 +120,7 @@ class RestOfflineQueueClient extends http.BaseClient {
onRequestError?.call(request, e);
_logger.warning('#send: $e');
} finally {
// unlock the request which results in a reattempt
// unlock the request for a later a reattempt
final db = await requestManager.getDb();
await cacheItem.unlock(db);
}
Expand Down

0 comments on commit d659ee6

Please sign in to comment.