src/main/java/org/embulk/input/zendesk/clients/ZendeskRestClient.java in embulk-input-zendesk-0.3.0 vs src/main/java/org/embulk/input/zendesk/clients/ZendeskRestClient.java in embulk-input-zendesk-0.3.1

- old
+ new

@@ -115,11 +115,12 @@ } }); } catch (RetryExecutor.RetryGiveupException | InterruptedException e) { if (e instanceof RetryExecutor.RetryGiveupException && e.getCause() != null && e.getCause() instanceof ZendeskException) { - throw new ConfigException(e.getCause().getMessage()); + throw new ConfigException("Status: '" + ((ZendeskException) (e.getCause())).getStatusCode() + "', error message: '" + e.getCause().getMessage() + "'", + e.getCause()); } throw new ConfigException(e); } } @@ -175,10 +176,10 @@ if (status == HttpStatus.SC_UNPROCESSABLE_ENTITY) { if (message.startsWith(ZendeskConstants.Misc.TOO_RECENT_START_TIME)) { //That means "No records from start_time". We can recognize it same as 200. return false; } - throw new ConfigException("Status: '" + status + "', error message '" + message + "'"); + throw new ConfigException("Status: '" + status + "', error message: '" + message + "'"); } if (status == ZendeskConstants.HttpStatus.TOO_MANY_REQUEST || status == HttpStatus.SC_INTERNAL_SERVER_ERROR || status == HttpStatus.SC_SERVICE_UNAVAILABLE) { if (!isPreview) {