We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 671e50c commit f0ea6f9Copy full SHA for f0ea6f9
src/main/java/dev/peekapi/PeekApiClient.java
@@ -399,7 +399,11 @@ private void send(List<RequestEvent> events) throws SendException {
399
} catch (SendException e) {
400
throw e;
401
} catch (java.io.IOException e) {
402
- throw new SendException("Network error: " + e.getMessage(), true);
+ String msg = e.getMessage();
403
+ if (msg == null && e.getCause() != null) {
404
+ msg = e.getCause().getClass().getSimpleName() + ": " + e.getCause().getMessage();
405
+ }
406
+ throw new SendException("Network error: " + msg, true);
407
} catch (InterruptedException e) {
408
Thread.currentThread().interrupt();
409
throw new SendException("Request interrupted", true);
0 commit comments