Package | Description |
---|---|
org.waarp.openr66.protocol.http.restv2.errors |
This package contains the code handling user input errors in the REST API.
|
Modifier and Type | Field and Description |
---|---|
List<RestError> |
RestErrorException.errors
The list of all
RestError errors found in the request. |
Modifier and Type | Method and Description |
---|---|
static RestError |
RestErrors.ALREADY_EXISTING(String id)
Creates an error saying that the database already contains an entry with
the same ID as the one in the
entry the user tried to create.
|
static RestError |
RestErrors.DUPLICATE_KEY(String field)
Creates an error saying that JSON object given has a duplicate field.
|
static RestError |
RestErrors.FIELD_NOT_ALLOWED(String field)
Creates an error saying that the given field is a primary key, and thus
cannot be changed when updating an
entry.
|
static RestError |
RestErrors.FILE_NOT_FOUND(String path)
Creates an error saying that the file requested for import at the given
location does not exist on the
server.
|
static RestError |
RestErrors.ILLEGAL_FIELD_VALUE(String field,
String value)
Creates an error saying that the given field has been assigned an illegal
value.
|
static RestError |
RestErrors.ILLEGAL_PARAMETER_VALUE(String parameter,
String value)
Creates an error saying that one of the request's parameters has an
illegal value.
|
static RestError |
RestErrors.MALFORMED_JSON(int line,
int column,
String cause)
Creates an error saying that the request content is not a valid JSON
object.
|
static RestError |
RestErrors.MISSING_BODY()
Creates an error saying that the request is missing a body when one was
required.
|
static RestError |
RestErrors.MISSING_FIELD(String field)
Creates an error saying that one of the JSON object's field is missing
when it was required.
|
static RestError |
RestErrors.RULE_NOT_ALLOWED(String host,
String rule)
Creates an error saying that the given host is not allowed to use the
given rule for its transfers.
|
static RestError |
RestErrors.UNKNOWN_FIELD(String field)
Creates an error saying that the JSON object sent had an extra unknown
field named with the given name.
|
static RestError |
RestErrors.UNKNOWN_HOST(String host)
Creates an error saying that the requested host name entered alongside
the newly created transfer does not
exist.
|
static RestError |
RestErrors.UNKNOWN_RULE(String rule)
Creates an error saying that the transfer rule entered alongside the
newly created transfer does not exist.
|
Constructor and Description |
---|
RestErrorException(RestError error)
Initializes an exception with a single error.
|
Constructor and Description |
---|
RestErrorException(List<RestError> errors)
Initializes an exception with a list of errors.
|
Copyright © 2009–2022 Waarp. All rights reserved.