Skip to content

Commit

Permalink
feat: catch host errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kian99 committed Sep 10, 2024
1 parent c31e1dc commit 94923c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,9 @@ func checkClientErr(err error, config juju.ControllerConfiguration) diag.Diagnos
var diags diag.Diagnostics

x509error := &x509.UnknownAuthorityError{}
x509HostError := &x509.HostnameError{}
netOpError := &net.OpError{}
if errors.As(err, x509error) {
if errors.As(err, x509error) || errors.As(err, x509HostError) {
errDetail = "Verify the ca_certificate property set on the provider"

if config.CACert == "" {
Expand Down

0 comments on commit 94923c5

Please sign in to comment.