Top Description Fields Constructors Methods
jakarta.ws.rs

public Class ClientErrorException

extends WebApplicationException
Class Inheritance
Known Direct Subclasses
jakarta.ws.rs.ForbiddenException, jakarta.ws.rs.NotAcceptableException, jakarta.ws.rs.NotAllowedException, jakarta.ws.rs.NotAuthorizedException, jakarta.ws.rs.NotFoundException, jakarta.ws.rs.NotSupportedException, jakarta.ws.rs.BadRequestException
Imports
jakarta.ws.rs.core.Response

A base runtime application exception indicating a client request error (HTTP 4xx status codes).
Author
Marek Potociar
Since
2.0

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
ClientErrorException(final Response.Status
client error status. Must be a 4xx status code.
status
)

Construct a new client error exception.

public
ClientErrorException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
final Response.Status
client error status. Must be a 4xx status code.
status
)

Construct a new client error exception.

public
ClientErrorException(final int
client error status. Must be a 4xx status code.
status
)

Construct a new client error exception.

public
ClientErrorException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
final int
client error status. Must be a 4xx status code.
status
)

Construct a new client error exception.

public
ClientErrorException(final Response
client error response. Must have a status code set to a 4xx status code.
response
)

Construct a new client error exception.

public
ClientErrorException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
final Response
client error response. Must have a status code set to a 4xx status code.
response
)

Construct a new client error exception.

public
ClientErrorException(final Response.Status
client error status. Must be a 4xx status code.
status
,
final Throwable
the underlying cause of the exception.
cause
)

Construct a new client error exception.

public
ClientErrorException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
final Response.Status
client error status. Must be a 4xx status code.
status
,
final Throwable
the underlying cause of the exception.
cause
)

Construct a new client error exception.

public
ClientErrorException(final int
client error status. Must be a 4xx status code.
status
,
final Throwable
the underlying cause of the exception.
cause
)

Construct a new client error exception.

public
ClientErrorException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
final int
client error status. Must be a 4xx status code.
status
,
final Throwable
the underlying cause of the exception.
cause
)

Construct a new client error exception.

public
ClientErrorException(final Response
client error response. Must have a status code set to a 4xx status code.
response
,
final Throwable
the underlying cause of the exception.
cause
)

Construct a new client error exception.

public
ClientErrorException(final String
the detail message (which is saved for later retrieval by the getMessage() method).
message
,
final Response
client error response. Must have a status code set to a 4xx status code.
response
,
final Throwable
the underlying cause of the exception.
cause
)

Construct a new client error exception.

Method Summary

Inherited from jakarta.ws.rs.WebApplicationException:
getResponsevalidatevalidate

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.ws.rs.WebApplicationException.serialVersionUID.

Constructor Detail

ClientErrorExceptionback to summary
public ClientErrorException(final Response.Status status)

Construct a new client error exception.

Parameters
status:Response.Status

client error status. Must be a 4xx status code.

Exceptions
IllegalArgumentException:
in case the status code is null or is not from jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final String message, final Response.Status status)

Construct a new client error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

status:Response.Status

client error status. Must be a 4xx status code.

Exceptions
IllegalArgumentException:
in case the status code is null or is not from jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final int status)

Construct a new client error exception.

Parameters
status:int

client error status. Must be a 4xx status code.

Exceptions
IllegalArgumentException:
in case the status code is not a valid HTTP status code or if it is not from the jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final String message, final int status)

Construct a new client error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

status:int

client error status. Must be a 4xx status code.

Exceptions
IllegalArgumentException:
in case the status code is not a valid HTTP status code or if it is not from the jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final Response response)

Construct a new client error exception.

Parameters
response:Response

client error response. Must have a status code set to a 4xx status code.

Exceptions
IllegalArgumentException:
in case the response status code is not from the jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final String message, final Response response)

Construct a new client error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

response:Response

client error response. Must have a status code set to a 4xx status code.

Exceptions
IllegalArgumentException:
in case the response status code is not from the jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final Response.Status status, final Throwable cause)

Construct a new client error exception.

Parameters
status:Response.Status

client error status. Must be a 4xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the status code is null or is not from jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final String message, final Response.Status status, final Throwable cause)

Construct a new client error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

status:Response.Status

client error status. Must be a 4xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the status code is null or is not from jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final int status, final Throwable cause)

Construct a new client error exception.

Parameters
status:int

client error status. Must be a 4xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the status code is not a valid HTTP status code or if it is not from the jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final String message, final int status, final Throwable cause)

Construct a new client error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

status:int

client error status. Must be a 4xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the status code is not a valid HTTP status code or if it is not from the jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final Response response, final Throwable cause)

Construct a new client error exception.

Parameters
response:Response

client error response. Must have a status code set to a 4xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the response status code is not from the jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.
ClientErrorExceptionback to summary
public ClientErrorException(final String message, final Response response, final Throwable cause)

Construct a new client error exception.

Parameters
message:String

the detail message (which is saved for later retrieval by the getMessage() method).

response:Response

client error response. Must have a status code set to a 4xx status code.

cause:Throwable

the underlying cause of the exception.

Exceptions
IllegalArgumentException:
in case the response status code is not from the jakarta.ws.rs.core.Response.Status.Family#CLIENT_ERROR status code family.