Ignore:
Timestamp:
2020-03-12T13:42:39+13:00 (4 years ago)
Author:
kjdon
Message:

check for error element in response - add that in if present, instead of the complete response. then it can be displayed on the page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/SystemAction.java

    r28964 r34018  
    138138
    139139        Node response_message = this.mr.process(mr_request_message);
    140 
    141         Element response = GSXML.duplicateWithNewName(doc, (Element) GSXML.getChildByTagName(response_message, GSXML.RESPONSE_ELEM), GSXML.RESPONSE_ELEM, true);
     140        Element response = doc.createElement(GSXML.RESPONSE_ELEM);
     141        if (processErrorElements((Element)response_message, response)) {
     142        } else {
     143          response = GSXML.duplicateWithNewName(doc, (Element) GSXML.getChildByTagName(response_message, GSXML.RESPONSE_ELEM), GSXML.RESPONSE_ELEM, true);
     144        }
    142145        addSiteMetadata(response, userContext);
    143146        addInterfaceOptions(response);
Note: See TracChangeset for help on using the changeset viewer.