You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/client.js
+38-64Lines changed: 38 additions & 64 deletions
Original file line number
Diff line number
Diff line change
@@ -138,8 +138,27 @@ module.exports = function (dependencies) {
138
138
returnsubDirectoryObject;
139
139
};
140
140
141
+
/**
142
+
* Determines if a request should be retried based on the error. This includes certain status codes, expired provider token, and transient write failures.
143
+
* @param {Object} error - An object representing the error which may include the following properties:
144
+
* @param {number} [error.status] - The HTTP status code returned from the APNs server.
145
+
* @param {VError} error.error - The error details which may include a message describing the error.
146
+
* @param {string} [error.error.message] - The error message which may indicate specific conditions such as 'ExpiredProviderToken' or transient write failures.
147
+
* @returns {boolean} - Returns true if the request is considered retryable based on the error, otherwise false.
// This can happen after the server initiates a goaway, and the client did not finish closing and destroying the session yet, so the client tries to send a request on a closing session.
0 commit comments