private <T> CreateSendException handleErrorResponse(UniformInterfaceException ue,
ErrorDeserialiser<T> deserialiser) {
ClientResponse response = ue.getResponse();
ApiErrorResponse<T> apiResponse = null;
Status responseStatus = response.getClientResponseStatus();
if(responseStatus == Status.BAD_REQUEST ||
responseStatus == Status.NOT_FOUND ||
responseStatus == Status.UNAUTHORIZED) {
try {
apiResponse = deserialiser.getResponse(response);