diff --git a/http/data_source.go b/http/data_source.go index fba87231..a61da023 100644 --- a/http/data_source.go +++ b/http/data_source.go @@ -70,8 +70,8 @@ func dataSourceRead(d *schema.ResourceData, meta interface{}) error { // Append `ca_certificate` to the system CA cert pool if caCert != "" { - if err := caCertPool.AppendCertsFromPEM([]byte(caCert)); !err { - return fmt.Errorf("Error when adding CA certificate: %s", err) + if ok := caCertPool.AppendCertsFromPEM([]byte(caCert)); !ok { + return fmt.Errorf("Error when adding CA certificate to certificate pool") } }