// System.out.println("query >>>>>>> " + pdbRestRequest.toString());
// Check the response status and report exception if one occurs
- if (clientResponse.getStatus() != 200)
+ int responseStatus = clientResponse.getStatus();
+ if (responseStatus != 200)
{
String errorMessage = "";
- if (clientResponse.getStatus() == 400)
+ if (responseStatus == 400)
{
errorMessage = parseJsonExceptionString(responseString);
throw new Exception(errorMessage);
else
{
errorMessage = getMessageByHTTPStatusCode(
- clientResponse.getStatus(), "PDB");
+ responseStatus, "PDB");
throw new Exception(errorMessage);
}
}