Skip to content

DNS lookup error: message should perhaps include host and port #288

@perlun

Description

@perlun

If an invalid DNS name is used, this is the e.message that gets raised:

ERROR [2017-04-20 12:52:05.397] ConsoleLogger: Error message: getaddrinfo: name or service not known

As can be seen in this code, the host and port gets included here, but not in the message: https://github.com/ruby-ldap/ruby-net-ldap/blob/master/lib/net/ldap/connection.rb#L68

Is this by design? It makes the code using the gem a bit harder; we cannot just use the exception text and log it right away (like above), but we would need to special-case exceptions caused by this gem specifically and log the extra data.

Thanks for a great gem! 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions