improve error message

This commit is contained in:
pbthorste 2017-01-27 01:50:45 +01:00
parent daba1aff9d
commit deb56bd93d

View File

@ -125,7 +125,7 @@ func resourcePostgreSQLDatabaseCreate(d *schema.ResourceData, meta interface{})
//needed in order to set the owner of the db if the connection user is not a superuser
err = grantRoleMembership(conn, d.Get(dbOwnerAttr).(string), c.username)
if err != nil {
return err
return errwrap.Wrapf(fmt.Sprintf("Error granting role membership on database %s: {{err}}", dbName), err)
}
// Handle each option individually and stream results into the query