Class UnknownHttpStatusCodeException

All Implemented Interfaces:
Serializable

public class UnknownHttpStatusCodeException extends RestClientResponseException
Exception thrown when an unknown (or custom) HTTP status code is received.
Since:
3.2
Author:
Rossen Stoyanchev
See Also:
  • Constructor Details

    • UnknownHttpStatusCodeException

      public UnknownHttpStatusCodeException(int rawStatusCode, String statusText, @Nullable HttpHeaders responseHeaders, @Nullable byte[] responseBody, @Nullable Charset responseCharset)
      Construct a new instance of HttpStatusCodeException based on a status code, status text, and response body content.
      Parameters:
      rawStatusCode - the raw status code value
      statusText - the status text
      responseHeaders - the response headers (may be null)
      responseBody - the response body content (may be null)
      responseCharset - the response body charset (may be null)
    • UnknownHttpStatusCodeException

      public UnknownHttpStatusCodeException(String message, int rawStatusCode, String statusText, @Nullable HttpHeaders responseHeaders, @Nullable byte[] responseBody, @Nullable Charset responseCharset)
      Construct a new instance of HttpStatusCodeException based on a status code, status text, and response body content.
      Parameters:
      rawStatusCode - the raw status code value
      statusText - the status text
      responseHeaders - the response headers (may be null)
      responseBody - the response body content (may be null)
      responseCharset - the response body charset (may be null)
      Since:
      5.2.2