Closed TjeerdvanDijk closed 4 years ago
It looks like you have logging enabled for the apache library, you would need to disable that logging. This has nothing to do with Unirest wrapping and throwing the exception. I cannot disable this log, only you can
Hmm, thats strange, i never enabled myself. anyways, the log got removed by doing System.setProperty("org.apache.commons.logging.Log","org.apache.commons.logging.impl.NoOpLog");
so i should figure out whats enabling it.
Describe the bug When a server returns no response, a exception is thrown, you can catch UnirestException but it will still log a error outside of our catch block.
To Reproduce
Unirest.get(url).connectTimeout(1500).socketTimeout(3000).asString();
Expected behavior The exception is not logged, the UnirestException already contains the exact same message.
Screenshots The NoHttpResponseException error we don't want: link What can be catched using UnirestException: link
Environmental Data: OpenJDK Runtime Environment 18.9 (build 11.0.6+10)
Additional context I'm running my rest server inside of a PaperSpigot minecraft server (with very low specs), it occurs while the server is initializing, so the address is reachable, but the server application unresponsive