Package org.fluxtream.core.utils

Examples of org.fluxtream.core.utils.UnexpectedHttpResponseCodeException


                }
            }
        } catch (Throwable t) {
            // just ignore any potential problems here
        }
        throw new UnexpectedHttpResponseCodeException(statusCode, message + " - unexpected status code: " + statusCode);
    }
View Full Code Here


                    String message40x = "Unexpected response code: " + statusCode;
                    if (message!=null) message40x += " message: " + message;
                    throw new UpdateFailedException(message40x, new Exception(), true, ApiKey.PermanentFailReason.clientError(statusCode, message));
                }
                else {
                    throw new UnexpectedHttpResponseCodeException(response.getStatusLine().getStatusCode(),
                                                                  response.getStatusLine().getReasonPhrase());
                }
            }
        }
        finally {
View Full Code Here

                return json.getString("payload");
            }
            else throw new RuntimeException("Could not get payload from Couch server");
        }
        else {
            throw new UnexpectedHttpResponseCodeException(statusCode, response.getStatusLine().getReasonPhrase());
        }
    }
View Full Code Here

            content = responseHandler.handleResponse(response);
            JSONObject json = JSONObject.fromObject(content);
            return json.getBoolean("ok");
        }
        else {
            throw new UnexpectedHttpResponseCodeException(statusCode, response.getStatusLine().getReasonPhrase());
        }
    }
View Full Code Here

                    case 2556:
                        message = "2556 : Service is not defined";
                        throw new UpdateFailedException(message, true,
                                                        ApiKey.PermanentFailReason.unknownReason(message));
                    default:
                    throw new UnexpectedHttpResponseCodeException(withingsStatusCode, "Unexpected status code: " + withingsStatusCode);
                }

            }
            countSuccessfulApiCall(updateInfo.apiKey, updateInfo.objectTypes, then, url);
            if (!StringUtils.isEmpty(json))
View Full Code Here

TOP

Related Classes of org.fluxtream.core.utils.UnexpectedHttpResponseCodeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.