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
/// Called when response contains one or more GraphQL errors.
73
+
/// NOTE: Don't just call the `retryHandler` with `true` all the time, or you can potentially wind up in an infinite loop of errors
74
+
///
75
+
/// - Parameters:
76
+
/// - networkTransport: The network transport which received the error
77
+
/// - errors: The received GraphQL errors
78
+
/// - retryHandler: A closure indicating whether the operation should be retried. Asyncrhonous to allow for re-authentication or other async operations to complete.
/// A network transport that uses HTTP POST requests to send GraphQL operations to a server, and that uses `URLSession` as the networking implementation.
@@ -131,6 +146,7 @@ public class HTTPNetworkTransport {
131
146
132
147
iflet receivedError = error {
133
148
self.handleErrorOrRetry(operation: operation,
149
+
files: files,
134
150
error: receivedError,
135
151
for: request,
136
152
response: response,
@@ -147,6 +163,7 @@ public class HTTPNetworkTransport {
147
163
response: httpResponse,
148
164
kind:.errorResponse)
149
165
self.handleErrorOrRetry(operation: operation,
166
+
files: files,
150
167
error: unsuccessfulError,
151
168
for: request,
152
169
response: response,
@@ -159,6 +176,7 @@ public class HTTPNetworkTransport {
159
176
response: httpResponse,
160
177
kind:.invalidResponse)
161
178
self.handleErrorOrRetry(operation: operation,
179
+
files: files,
162
180
error: error,
163
181
for: request,
164
182
response: response,
@@ -170,10 +188,13 @@ public class HTTPNetworkTransport {
170
188
guardlet body =tryself.serializationFormat.deserialize(data: data)as?JSONObjectelse{
0 commit comments