You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reading the following source code, I found that in the response, I could not get the "RetryAfter" response header. This information is quite important. Can you add it?
When the "handleErrorResponse" exception is thrown, I hope to bring this information. Of course, if there are other better ways, that's fine too.
`
public static String handleResponse(Request request, boolean showLimitUsage, ProxyAuth proxy) {
client = HttpClientSingleton.getHttpClient(proxy);
try (Response response = client.newCall(request).execute()) {
if (null == response) {
throw new BinanceServerException("[ResponseHandler] No response from server");
}
String responseAsString = getResponseBodyAsString(response.body());
if (response.code() >= HTTP_STATUS_CODE_400 && response.code() <= HTTP_STATUS_CODE_499) {
throw handleErrorResponse(responseAsString, response.code());
} else if (response.code() >= HTTP_STATUS_CODE_500) {
throw new BinanceServerException(responseAsString, response.code());
}
if (showLimitUsage) {
return getLimitUsage(response, responseAsString);
} else {
return responseAsString;
}
} catch (IOException | IllegalStateException e) {
String exceptionMsg = "OKHTTP Error: ";
if (proxy != null) {
if ((e.getClass().equals(ConnectException.class))) {
exceptionMsg = "Proxy Connection Error: ";
} else if ((e.getClass().equals(UnknownHostException.class))) {
exceptionMsg = "Proxy Unknown Host Error: ";
}
}
throw new BinanceConnectorException("[ResponseHandler] " + exceptionMsg + e.getMessage());
}
}
The text was updated successfully, but these errors were encountered:
After reading the following source code, I found that in the response, I could not get the "RetryAfter" response header. This information is quite important. Can you add it?
When the "handleErrorResponse" exception is thrown, I hope to bring this information. Of course, if there are other better ways, that's fine too.
`
The text was updated successfully, but these errors were encountered: