This message was deleted.
# azure
s
This message was deleted.
t
Could you please share a repro so that I could try it?
g
@tall-librarian-49374
Copy code
try 
  {
    var getCertificateResult = AzureNative.Web.GetCertificate.InvokeAsync(new      AzureNative.Web.GetCertificateArgs {
                        Name = $"certtesddt-{name}-{env}",
                        ResourceGroupName = resourceGroupName
                    }).GetAwaiter().GetResult();
  }
  catch(Grpc.Core.RpcException ex) 
  {
    Console.WriteLine(ex.Status.StatusCode);
    Console.WriteLine("--------------------");
    Console.WriteLine(ex.Status.Detail.Contains("ResourceNotFound"));
              
  }
t
Thank you. I’m away from my computer but you can try running pulumi in debug mode to see the raw HTTP response from Azure and whether it’s a 404:
pulumi up --yes --skip-preview --debug -v=9 --logflow --logtostderr
g
ow that's an overwhelming amount of logs lol. Looking at the stacktrace we can definitely see that there's a ResourceNotFound and a StatusCode of 404 which I think must come from the azure response it's just confusing how the status on the exception is inconsistent with the Exception.Status.Detail property (which has a string where Status and StatusCode are as expected)
t
Are you getting a different exception for other resource types?
g
The only other instance where I do some sort of check is for Cosmos containers and/or documents, but then the exception I get is different (CosmosException)
t
Is that one from the Azure SDK?
g
Sorry I was away. Yeah definitely from the sdk