From 1ef7f941df3ab22adf547c41c4bf4c2867e16b92 Mon Sep 17 00:00:00 2001 From: James Ni Date: Fri, 8 Dec 2023 23:33:07 +1100 Subject: [PATCH] re-create project when not found --- helpers/errors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/errors.go b/helpers/errors.go index 03e2d51c7..85eb3e3a3 100644 --- a/helpers/errors.go +++ b/helpers/errors.go @@ -64,7 +64,7 @@ func HandleReadApiError(err error, d *schema.ResourceData, httpResp *http.Respon "2) Please check if the token has expired or is wrong.") } if erro.Model() != nil { - if erro.Code() == nextgen.ErrorCodes.ResourceNotFound { + if erro.Code() == nextgen.ErrorCodes.ResourceNotFound || erro.Code() == "ENTITY_NOT_FOUND" { d.SetId("") d.MarkNewResource() return nil