Skip to content

Commit 5ef1173

Browse files
Unwrap error before trying to identify message for universal support (#629) (#630)
Co-authored-by: Laurent Saint-Félix <[email protected]>
1 parent 826ac9c commit 5ef1173

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch_internal_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ tuSVaQmm5eqgaAxMamBXSyw1lir07byemyuEDg0mJ1rNUGsAY8P+LWr579gvKMme
599599
client, _ := NewClient(config)
600600
_, err = client.Info()
601601

602-
if err.Error() != `x509: “instance” certificate is not standards compliant` {
602+
if errors.Unwrap(err).Error() != `x509: “instance” certificate is not standards compliant` {
603603
if ok := errors.As(err, &x509.UnknownAuthorityError{}); !ok {
604604
t.Fatalf("Uknown error, expected UnknownAuthorityError, got: %s", err)
605605
}

0 commit comments

Comments
 (0)