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:
Alan Grosskurth 2015-04-29 13:32:01 -07:00
parent b0abb4ea49
commit 023b2f94eb
1 changed files with 1 additions and 1 deletions

View File

@ -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)