com.google.gwt.user.client.rpc

## Class StatusCodeException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - com.google.gwt.user.client.rpc.InvocationException
        - - com.google.gwt.user.client.rpc.StatusCodeException

- All Implemented Interfaces:
    java.io.Serializable

      public class StatusCodeException
      extends InvocationException

  Indicates that an RPC response was returned with an invalid HTTP status code. This exception will be presented via `AsyncCallback.onFailure(Throwable)` if the HTTP response from the server does not have a `200` status code.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatusCodeException(int statusCode, java.lang.String encodedResponse)` Construct an exception with the given status code and description.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getEncodedResponse()` Returns the response message associated with the failed request.
    `int` | `getStatusCode()` Returns the status code associated with the failed request.

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### StatusCodeException

          public StatusCodeException(int statusCode,
                             java.lang.String encodedResponse)

      Construct an exception with the given status code and description.
      Parameters:
        `statusCode` - the HTTP status code to report
        `encodedResponse` - the HTTP response message to report

  - ### Method Detail

    - #### getEncodedResponse

          public java.lang.String getEncodedResponse()

      Returns the response message associated with the failed request.

    - #### getStatusCode

          public int getStatusCode()

      Returns the status code associated with the failed request.