AI-generated Key Takeaways
-
HttpStatusExceptionis an exception thrown when a server returns a non-200 response code. -
It can be constructed with a detail message and the HTTP error status code.
-
The
getHttpErrorStatus()method returns the status code of the failed HTTP request.
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.