@Response(code=400, description="Bad Request") public class BadRequest extends HttpException
The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing).
Modifier and Type | Field and Description |
---|---|
static int |
CODE
HTTP status code
|
static String |
MESSAGE
Default message
|
Constructor and Description |
---|
BadRequest()
Constructor.
|
BadRequest(String msg)
Constructor.
|
BadRequest(String msg,
Object... args)
Constructor.
|
BadRequest(Throwable cause)
Constructor.
|
BadRequest(Throwable cause,
String msg,
Object... args)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
BadRequest |
header(String name,
Object val)
Add an HTTP header to this exception.
|
getFullStackMessage, getHeaders, getRootCause, getStatus, hashCode, setStatus, toString
getCause, getMessage
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public static final int CODE
public static final String MESSAGE
public BadRequest(Throwable cause, String msg, Object... args)
cause
- The cause. Can be msg
- The message. Can be args
- Optional MessageFormat
-style arguments in the message.public BadRequest(String msg)
msg
- The message. Can be public BadRequest()
public BadRequest(String msg, Object... args)
msg
- The message. Can be args
- Optional MessageFormat
-style arguments in the message.public BadRequest(Throwable cause)
cause
- The cause. Can be public BadRequest header(String name, Object val)
HttpException
header
in class HttpException
name
- The header name.val
- The header value.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.