Skip to content

Commit dc8ee7a

Browse files
authored
chore: remove todo comments for appsec (#2578)
1 parent a7452c5 commit dc8ee7a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

AmplifyPlugins/API/Sources/AWSAPIPlugin/Operation/AWSGraphQLSubscriptionTaskRunner.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,10 @@ public class AWSGraphQLSubscriptionTaskRunner<R: Decodable>: InternalTaskRunner,
151151
} catch let error as APIError {
152152
fail(error)
153153
} 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
155155
// payload is the right thing to do. Another option would be to propagate a GraphQL error, but
156156
// leave the subscription alive.
157+
// see https://github.com/aws-amplify/amplify-swift/issues/2577
157158

158159
fail(APIError.operationError("Failed to deserialize", "", error))
159160
}
@@ -185,7 +186,7 @@ public class AWSGraphQLSubscriptionTaskRunner<R: Decodable>: InternalTaskRunner,
185186
}
186187
}
187188

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
189190
final public class AWSGraphQLSubscriptionOperation<R: Decodable>: GraphQLSubscriptionOperation<R> {
190191

191192
let pluginConfig: AWSAPICategoryPluginConfiguration
@@ -342,9 +343,11 @@ final public class AWSGraphQLSubscriptionOperation<R: Decodable>: GraphQLSubscri
342343
dispatch(result: .failure(error))
343344
finish()
344345
} 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
346347
// payload is the right thing to do. Another option would be to propagate a GraphQL error, but
347348
// leave the subscription alive.
349+
// see https://github.com/aws-amplify/amplify-swift/issues/2577
350+
348351
dispatch(result: .failure(APIError.operationError("Failed to deserialize", "", error)))
349352
finish()
350353
}

0 commit comments

Comments
 (0)