@@ -151,9 +151,10 @@ public class AWSGraphQLSubscriptionTaskRunner<R: Decodable>: InternalTaskRunner,
151
151
} catch let error as APIError {
152
152
fail ( error)
153
153
} catch {
154
- // TODO: Verify with the team that terminating a subscription after failing to decode/cast one
154
+ // Verify with the team that terminating a subscription after failing to decode/cast one
155
155
// payload is the right thing to do. Another option would be to propagate a GraphQL error, but
156
156
// leave the subscription alive.
157
+ // see https://github.com/aws-amplify/amplify-swift/issues/2577
157
158
158
159
fail ( APIError . operationError ( " Failed to deserialize " , " " , error) )
159
160
}
@@ -185,7 +186,7 @@ public class AWSGraphQLSubscriptionTaskRunner<R: Decodable>: InternalTaskRunner,
185
186
}
186
187
}
187
188
188
- // TODO: Remove this code, it has replaced been with AWSGraphQLSubscriptionTaskRunner above.
189
+ // Class is still necessary. See https://github.com/aws-amplify/amplify-swift/issues/2252
189
190
final public class AWSGraphQLSubscriptionOperation < R: Decodable > : GraphQLSubscriptionOperation < R > {
190
191
191
192
let pluginConfig : AWSAPICategoryPluginConfiguration
@@ -342,9 +343,11 @@ final public class AWSGraphQLSubscriptionOperation<R: Decodable>: GraphQLSubscri
342
343
dispatch ( result: . failure( error) )
343
344
finish ( )
344
345
} catch {
345
- // TODO: Verify with the team that terminating a subscription after failing to decode/cast one
346
+ // Verify with the team that terminating a subscription after failing to decode/cast one
346
347
// payload is the right thing to do. Another option would be to propagate a GraphQL error, but
347
348
// leave the subscription alive.
349
+ // see https://github.com/aws-amplify/amplify-swift/issues/2577
350
+
348
351
dispatch ( result: . failure( APIError . operationError ( " Failed to deserialize " , " " , error) ) )
349
352
finish ( )
350
353
}
0 commit comments