Fix compile: return a string, not an error to `errwrap`
This commit is contained in:
parent
4919f16cca
commit
152b0b1ff6
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue