Since Pulumi functions via desired state, that means it doesn't actually make any cloud provider or api calls until after it has executed through your desired state, built your dependency tree, and determined ordering etc. This means the exception for a missing stack isn't thrown when your StackReference is instantiated, it is thrown later after the dependency tree is built when the Pulumi engine is processing that tree to reach your desired state. So the instantiation itself is executing to completion without error.
I don't think this is possible without you catching the exception outside of your pulumi up call, making some change, and then invoking Pulumi again. Which would require Automation API.