Error 1: The first error message is from an reachable host, localhost:
Error2: this error is from an invalid endpoint.
My team has no control over these errors, but I would think error 1 for a invalid host could be a better error, especially since this is customer facing (for us).