Fix compile: return a string, not an error to `errwrap`

This commit is contained in:
Sean Chittenden 2016-12-27 15:46:06 -08:00
parent 4919f16cca
commit 152b0b1ff6
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16
1 changed files with 1 additions and 1 deletions

View File

@ -374,7 +374,7 @@ func resourcePostgreSQLRoleReadImpl(d *schema.ResourceData, meta interface{}) er
err = conn.QueryRow("SELECT COALESCE(passwd, '') FROM pg_catalog.pg_shadow AS s WHERE s.usename = $1", roleId).Scan(&rolePassword) err = conn.QueryRow("SELECT COALESCE(passwd, '') FROM pg_catalog.pg_shadow AS s WHERE s.usename = $1", roleId).Scan(&rolePassword)
switch { switch {
case err == sql.ErrNoRows: case err == sql.ErrNoRows:
return errwrap.Wrapf(fmt.Errorf("PostgreSQL role (%s) not found in shadow database: {{err}}", roleId), err) return errwrap.Wrapf(fmt.Sprintf("PostgreSQL role (%s) not found in shadow database: {{err}}", roleId), err)
case err != nil: case err != nil:
return errwrap.Wrapf("Error reading role: {{err}}", err) return errwrap.Wrapf("Error reading role: {{err}}", err)
default: default: