Package com.ebasetech.xi.services
Interface Errors
public interface Errors
Errors
provides methods to create service errors- Since:
- V5.13
-
Method Summary
Modifier and Type Method Description HttpAuthorisationError
createAuthorisationError(java.lang.String error, int code)
Creates aHttpAuthorisationError
supplying an error message and the response code.HttpNotFoundError
createNotFoundError(java.lang.String error, int code)
Creates aHttpNotFoundError
supplying an error message and the response code.HttpRequestError
createRequestError(java.lang.String error, int code)
Creates aHttpRequestError
supplying an error message and the response code.HttpServerError
createServerError(java.lang.String error, int code)
Creates aHttpServerError
supplying an error message and the response code.HttpUnknownError
createUnknownError(java.lang.String error, int code)
Creates aHttpUnknownError
supplying an error message and the response code.
-
Method Details
-
createRequestError
Creates aHttpRequestError
supplying an error message and the response code. This is typically used to create HTTP response failure errors, for example the server responds with a 400 Bad Request code- Parameters:
error
- message for the Request Errorcode
- response code from the RESTFul data connector call- Returns:
- new RequestError instance
-
createAuthorisationError
Creates aHttpAuthorisationError
supplying an error message and the response code. This should be used when generating Authentication errors, for example the server responds with a 401 Unauthorized code- Parameters:
error
- message for the Authorisation Errorcode
- response code from the RESTFul data connector call- Returns:
- new AuthorisationError instance
-
createNotFoundError
Creates aHttpNotFoundError
supplying an error message and the response code. This should be used when generating not found errors, for example the server responds with a 404 Not Found code- Parameters:
error
- message for the Not Found Errorcode
- response code from the RESTFul data connector call- Returns:
- new NotFoundError instance
-
createServerError
Creates aHttpServerError
supplying an error message and the response code. This should be used when generating generic server errors, for example the server responds with a 500 Server Error code- Parameters:
error
- message for the Server Errorcode
- response code from the RESTFul data connector call- Returns:
- new ServerError instance
-
createUnknownError
Creates aHttpUnknownError
supplying an error message and the response code. This should be used when generating an Unknown Error, for example the HTTP code is not recognized- Parameters:
error
- message for the Server Errorcode
- response code from the RESTFul data connector call- Returns:
- new UnknownError instance
-