Skip to content

Commit

Permalink
don't try to convert bool error in string
Browse files Browse the repository at this point in the history
  • Loading branch information
Thierno BARRY committed Jan 2, 2020
1 parent 16c3db8 commit 84ab348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http/data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down

0 comments on commit 84ab348

Please sign in to comment.