`ApplyTWithContext` mentions that the provided con...
# golang
b
ApplyTWithContext
mentions that the provided context can be used to reject the output as cancelled. If I call the context
cancel
method, what am I supposed to expect?
ApplyTWithContext
only returns a single value of type
Output
. As a caller of
ApplyTWithContext
how am I supposed to detect a "rejected output"?
b
@bright-sandwich-93783 I believe you can have an applier function that returns an error: https://pkg.go.dev/github.com/pulumi/pulumi/sdk@v1.14.1/go/pulumi#OutputState.ApplyT
You can also see in the code that an Output (e.g. StringOutput) will internally store whether it is rejected/errored: https://github.com/pulumi/pulumi/blob/sdk/v3.6.1/sdk/go/pulumi/types.go#L77