All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.launchdarkly.eventsource.UnsuccessfulResponseException Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
package com.launchdarkly.eventsource;

/**
 * Exception class that means the remote server returned an HTTP error.
 */
@SuppressWarnings("serial")
public class UnsuccessfulResponseException extends Exception {

  private final int code;

  /**
   * Constructs an exception instance.
   * @param code the HTTP status
   */
  public UnsuccessfulResponseException(int code) {
    super("Unsuccessful response code received from stream: " + code);
    this.code = code;
  }

  /**
   * Returns the HTTP status code.
   * @return the HTTP status
   */
  public int getCode() {
    return code;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy