HomePhorge

Provide a helpful error message when name resolution fails
aae3a58b7d24Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Provide a helpful error message when name resolution fails

Previously, this would print a message like:

getaddrinfo: nodename nor servname not provided, or not found

Which is opaque to anyone who doesn't already know what it means. This is a
very common case (it happens, for instance, when first starting a default agent
without setting up a DNS entry for 'puppet'). Now, we catch SocketError when
making an HTTP request, and print a more useful error message if this is the
particular failure case.