class AAIErrorFormatter {

    public String getMessage() {
        if (error.getRequestError() != null && error.getRequestError().getServiceException() != null) {
            ServiceException serviceException = error.getRequestError().getServiceException();
            return this.fillInTemplate(serviceException.getText(), serviceException.getVariables());
        }

        return "no parsable error message found";
    }

    public  AAIErrorFormatter(AAIError error);

}