* @return A simple HTML for the given response status.
*/
@Override
public CharSequence error(final DataSourceRequest request, final ResponseStatus status) {
// Get the responseStatus details.
StatusType type = status.getStatusType();
ReasonType reason = status.getReasonType();
String detailedMessage = status.getDescription();
// Create an xml document with head and an empty body.
Document document = createDocument();
Element bodyElement = appendHeadAndBody(document);
// Populate the xml document.
Element oopsElement = document.createElement("h3");
oopsElement.setTextContent("Oops, an error occured.");
bodyElement.appendChild(oopsElement);
if(type != null) {
String text = "Status: " + type.lowerCaseString();
appendSimpleText(document, bodyElement, text);
}
if(reason != null) {
String text = "Reason: " + reason.getMessageForReasonType(null);