Skip to content

Commit 60f86a9

Browse files
Provide better error description for the "unknown ca" error
... when adding nodes to cluster Change-Id: I8301c962b94133d972b0e8c7c70dbdc6ffc11e9e Reviewed-on: https://review.couchbase.org/c/ns_server/+/172012 Well-Formed: Build Bot <[email protected]> Tested-by: Timofey Barmin <[email protected]> Reviewed-by: Steve Watanabe <[email protected]>
1 parent 979a9ef commit 60f86a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ns_error_messages.erl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ connection_error_message({tls_alert, {handshake_failure, Str}}, Host, Port)
4040
list_to_binary(io_lib:format("Failed to establish TLS connection to ~s:~w. "
4141
"TLS handshake failure (~s)",
4242
[Host, Port, Str]));
43+
connection_error_message({tls_alert, {unknown_ca, Str}}, Host, Port)
44+
when is_list(Str) ->
45+
list_to_binary(io_lib:format("Failed to establish TLS connection to ~s:~w. "
46+
"The certificate is issued by unknown CA or "
47+
"some of the intermediate certificates are "
48+
"missing (~s)", [Host, Port, Str]));
4349
connection_error_message({tls_alert, M}, Host, Port) ->
4450
list_to_binary(io_lib:format("Failed to establish TLS connection to ~s:~w: ~p", [Host, Port, M]));
4551
connection_error_message({AFamily, nxdomain}, Host, _Port) ->

0 commit comments

Comments
 (0)