Error while logging in to CRM java.util.NoSuchElementException; Internal Server Error
Hi,
I often get this error java.util.NoSuchElementException.Response: 500 and Response Code: Internal Server Error.
The strange thing is this error is intermediate which means Sometimes I get this error while sometime not.
Can anyone tell me why this erroor is coming.
I suspect this part of code for this error. Does anyone has a better loggin code
public static String getCookieFromHeaders(HttpURLConnection wsConnection) {
// debug code - display all the returned headers
String headerName;
String headerValue = "FAIL";
for (int i = 0; ; i++) {
headerName = wsConnection.getHeaderFieldKey(i);
if (headerName != null && headerName.equals("Set-Cookie")) {
// found the Set-Cookie header (code assumes only one cookie is being set)