         get async {
             if shouldAutomaticallyCancel {
                 return await withTaskCancellationHandler {
+                    await task.value
+                } onCancel: {
                     self.cancel()
-                } operation: {
-                    await task.value
                 }
             } else {
                 return await task.value

        get async {
            if shouldAutomaticallyCancel {
                return await withTaskCancellationHandler {
                    self.cancel()
                } operation: {
                    await task.value
                }
            } else {
                return await task.value

        -> DataTask<Value> {
        let task = Task {
            await withTaskCancellationHandler {
                await withCheckedContinuation { continuation in
                    onResponse {
                        continuation.resume(returning: $0)
                    }
                }
            } onCancel: {
                self.cancel()
            }
        }

