public class APIError extends Object
Modifier and Type | Class and Description |
---|---|
static class |
APIError.Type
All possible types of REST API errors.
|
Constructor and Description |
---|
APIError(APIError.Type type,
String message)
Create a new APIError with the specified error message.
|
APIError(APIError.Type type,
String message,
Collection<Field> expected)
Create a new APIError with the specified error message and parameter
information.
|
Modifier and Type | Method and Description |
---|---|
Collection<Field> |
getExpected()
Returns a collection of all required parameters, where each parameter is
represented by a field.
|
String |
getMessage()
Returns a human-readable error message describing the error that
occurred.
|
APIError.Type |
getType()
Returns the type of error that occurred.
|
public APIError(APIError.Type type, String message)
type
- The type of error that occurred.message
- The error message.public APIError(APIError.Type type, String message, Collection<Field> expected)
type
- The type of error that occurred.message
- The error message.expected
- All parameters expected in the original request, or now required as
a result of the original request, as a collection of fields.public APIError.Type getType()
public Collection<Field> getExpected()
public String getMessage()
Copyright © 2016. All rights reserved.