update check in case of 401

This commit is contained in:
Andreea Nechifor
2017-12-08 11:42:58 +02:00
parent b4a1cd4be3
commit 1d508c754b

View File

@@ -859,7 +859,8 @@ public class PublicApiClient
errorMessage + ": \n" + " Response: " + response;
throw new PublicApiException(msg, response);
}
if (expectedStatus >= 400) {
///in case of Status.SC_UNAUTHORIZED no response is returned
if (expectedStatus >= 400 && expectedStatus != 401) {
checkErrorKeyResponse(errorMessage, expectedStatus, response);
}
}