Anyone have experience with error handling for Sta...
# golang
g
Anyone have experience with error handling for Stack References? I have a situation where I want to read outputs of another stack, but it may not exist yet. It seems like in that situation, Pulumi is canceling the context and I never have a chance to handle the error gracefully, e.g.:
Copy code
ref, err := pulumi.NewStackReference(ctx, stack, nil)
if err != nil {
    fmt.Println("never make it here")
    return errors.Join(ErrStackNotFound, err)
}
e
This is basically another case of https://github.com/pulumi/pulumi/issues/3364.
g
Ah, true. Thanks. Didn’t connect the dots there somehow. Stack references don’t “feel” like resources.