package retrofit;

import java.io.IOException;

/** Exception for an unexpected, non-2xx HTTP response. */
public final class HttpException extends IOException {
  private final int code;
  private final String message;
  private final transient Response<?> response;

  public HttpException(Response<?> response) {
    super("HTTP " + response.code() + " " + response.message());
    this.code = response.code();
    this.message = response.message();
    this.response = response;
  }

  /** HTTP status code. */
  public int code() {
    return code;
  }

  /** HTTP status message. */
  public String message() {
    return message;
  }

  /**
   * The full HTTP response. This may be null if the exception was serialized.
   */
  public Response<?> response() {
    return response;
  }
}

@@ -16,37 +16,8 @@
 t;%0A%0A
-import java.io.IOException;%0A%0A
 /** 
@@ -116,10 +116,8 @@
 nds 
-IO
 Exce

Switch HttpException to not be an IOException.