mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-01-19 05:43:51 +01:00
Make Tor connect error message more human readable (#4078)
This commit is contained in:
parent
6cfbf67812
commit
1708add6ec
@ -66,7 +66,7 @@ case class Server(
|
||||
StatusCodes.BadRequest))
|
||||
case err: Throwable =>
|
||||
logger.info(s"Unhandled error in server:", err)
|
||||
complete(Server.httpError(s"Request failed: ${err.getMessage}"))
|
||||
complete(Server.httpError(err.getMessage))
|
||||
}
|
||||
|
||||
handleRejections(rejectionHandler) {
|
||||
|
@ -79,7 +79,8 @@ class DLCClient(
|
||||
remoteAddress: InetSocketAddress,
|
||||
proxyAddress: InetSocketAddress): Receive = LoggingReceive {
|
||||
case c @ Tcp.CommandFailed(_: Socks5Connect) =>
|
||||
val ex = c.cause.getOrElse(new IOException(s"UnknownError: $c"))
|
||||
val ex = c.cause.getOrElse(new IOException(
|
||||
s"Cannot connect to ${remoteAddress.getHostString}:${remoteAddress.getPort} via Tor"))
|
||||
log.error(s"connection failed to $remoteAddress via SOCKS5 $proxyAddress",
|
||||
ex)
|
||||
throw ex
|
||||
|
Loading…
Reference in New Issue
Block a user