Class UnexpectedStatusException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ClientErrorException, RedirectionException, ServerErrorException

public class UnexpectedStatusException extends ProtocolException
An exception that's thrown when a response status code was unexpected.

There are three major subclasses: RedirectionException for 3xx response status codes, ClientErrorException for 4xx response status codes and ServerErrorException for 5xx response status codes, some of them having subclasses themselves. Implementations should always pick the most appropriate error class to allow for proper exception handling.

See Also: