Google is committed to advancing racial equity for Black communities. See how.

HttpStatusException

public class HttpStatusException extends Exception

Exception thrown when the server returns a non-200 response code.

Public Constructor Summary

HttpStatusException(String msg, int errorHttpStatus)
Constructs a HttpStatusException with the specified detail message and error code.

Public Method Summary

int
getHttpErrorStatus()
Returns the status code of a failed HTTP request.

Inherited Method Summary

Public Constructors

public HttpStatusException (String msg, int errorHttpStatus)

Constructs a HttpStatusException with the specified detail message and error code.

Parameters
msg The detail message (which is saved for later retrieval by the getMessage() method)
errorHttpStatus The status code of the failed HTTP request.

Public Methods

public int getHttpErrorStatus ()

Returns the status code of a failed HTTP request.