Skip to content

Confusing error from ssl:connect/3 when Host is a binary #10007

@rlipscombe

Description

@rlipscombe

Describe the bug

The error reported by ssl:connect/3 when Host is a binary (or otherwise not a string?) is confusing/misleading:

1> application:ensure_all_started(ssl).
{ok,[crypto,asn1,public_key,ssl]}
2> ssl:connect(<<"localhost">>, 55156, [{verify, verify_none}]).
{error,{options,{socket_options,[{packet_size,0},
                                 {packet,0},
                                 {header,0},
                                 {active,false},
                                 {mode,binary}]}}}

Expected behavior

A badarg error/exception or similar. Not something that complains about socket_options, anyway.

Affected versions

OTP-26.x, OTP-27.x, OTP-28.0.1

Metadata

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:PSAssigned to OTP team PS

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions