Fix: raise the right exception on failed to connect to server

This commit is contained in:
Laurent Clouet
2023-09-16 09:08:13 +02:00
parent 1b8e267f68
commit 2ce3b28b54

View File

@@ -482,6 +482,9 @@ public class Server extends Thread {
this.lastRequestTime = new Date().getTime();
return response;
}
catch (ConnectException e) {
throw new ConnectException("Unexpected response from HTTP Stack" + e.getMessage());
}
catch (IOException e) {
throw new IOException("Unexpected response from HTTP Stack" + e.getMessage());
}