Lines Matching refs:code
175 // MSFT's custom HTTP result code indicating the need to provision
327 * Determine whether an HTTP code represents an authentication error
328 * @param code the HTTP code returned by the server
329 * @return whether or not the code represents an authentication error
331 protected boolean isAuthError(int code) {
332 return (code == HttpStatus.SC_UNAUTHORIZED) || (code == HttpStatus.SC_FORBIDDEN);
336 * Determine whether an HTTP code represents a provisioning error
337 * @param code the HTTP code returned by the server
338 * @return whether or not the code represents an provisioning error
340 protected boolean isProvisionError(int code) {
341 return (code == HTTP_NEED_PROVISIONING) || (code == HttpStatus.SC_FORBIDDEN);
389 int code = resp.getStatusLine().getStatusCode();
390 userLog("Validation (OPTIONS) response: " + code);
391 if (code == HttpStatus.SC_OK) {
409 code = resp.getStatusLine().getStatusCode();
411 if (code == HttpStatus.SC_FORBIDDEN || code == HTTP_NEED_PROVISIONING) {
420 } else if (code == HttpStatus.SC_NOT_FOUND) {
423 } else if (code != HttpStatus.SC_OK) {
425 userLog("Unexpected response for FolderSync: ", code);
431 if (isAuthError(code)) {
435 // TODO Need to catch other kinds of errors (e.g. policy) For now, report the code.
436 userLog("Validation failed, reporting I/O error: ", code);
482 * @throws IOException on any IOException within the HttpClient code
489 int code = resp.getStatusLine().getStatusCode();
491 if (code == AUTO_DISCOVER_REDIRECT_CODE) {
498 } else if (code == HttpStatus.SC_UNAUTHORIZED) {
512 } else if (code != HttpStatus.SC_OK) {
514 userLog("Code: " + code + ", throwing IOException");
589 // Get the "final" code; if it's not 200, just return null
590 int code = resp.getStatusLine().getStatusCode();
591 userLog("Code: " + code);
592 if (code != HttpStatus.SC_OK) return null;
798 int code = resp.getStatusLine().getStatusCode();
799 if (code == HttpStatus.SC_OK) {
809 svc.userLog("GAL lookup returned " + code);
1034 * @param req the request (message id and response code)
1062 userLog("Meeting response request failed, code: " + status);
1312 int code = resp.getStatusLine().getStatusCode();
1313 if (code == HttpStatus.SC_OK) {
1366 int code = resp.getStatusLine().getStatusCode();
1367 if (code == HttpStatus.SC_OK) {
1424 int code = resp.getStatusLine().getStatusCode();
1425 userLog("OPTIONS response: ", code);
1426 if (code == HttpStatus.SC_OK) {
1470 int code = resp.getStatusLine().getStatusCode();
1471 if (code == HttpStatus.SC_OK) {
1482 } else if (isProvisionError(code)) {
1496 } else if (isAuthError(code)) {
1500 userLog("FolderSync response error: ", code);
1698 int code = res.getStatusLine().getStatusCode();
1699 userLog("Ping response: ", code);
1707 if (code == HttpStatus.SC_OK) {
1735 } else if (isAuthError(code)) {
1737 userLog("Authorization error during Ping: ", code);
1846 * This behavior is seemingly random, and therefore we must code defensively
1925 * Common code to sync E+PIM data
2029 int code = resp.getStatusLine().getStatusCode();
2030 if (code == HttpStatus.SC_OK) {
2051 userLog("Sync response error: ", code);
2052 if (isProvisionError(code)) {
2054 } else if (isAuthError(code)) {