Changeset 34018

Show
Ignore:
Timestamp:
12.03.2020 13:42:39 (3 weeks 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

Files:
1 modified

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);