mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-05 21:53:04 -06:00
providers/cloudflare: Better error message
Currently, if a record isn't found, we get an error like: Couldn't find record: Record not found This change improves the error message to add more context: Couldn't find record ID (123456789) for domain (example.com): Record not found
This commit is contained in:
parent
b0abb4ea49
commit
023b2f94eb
@ -91,7 +91,7 @@ func resourceCloudFlareRecordRead(d *schema.ResourceData, meta interface{}) erro
|
||||
|
||||
rec, err := client.RetrieveRecord(d.Get("domain").(string), d.Id())
|
||||
if err != nil {
|
||||
return fmt.Errorf("Couldn't find record: %s", err)
|
||||
return fmt.Errorf("Couldn't find record ID (%s) for domain (%s): %s", d.Id(), d.Get("domain").(string), err)
|
||||
}
|
||||
|
||||
d.Set("name", rec.Name)
|
||||
|
Loading…
Reference in New Issue
Block a user