} else {
audit.audit( userSession.getId(), userSession.getName(), path, getObjectName(), getClass().getName(),
MessageTypes.FAILED, instanceId, "", 0, this );
sendErrorResponse();
}
<BUG>}
protected void sendErrorResponse() throws IOException {
HttpServletResponse httpResponse = getServletResponse();
</BUG>
httpResponse.setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR );

} else {
audit.audit( userSession.getId(), userSession.getName(), path, getObjectName(), getClass().getName(),
MessageTypes.FAILED, instanceId, "", 0, this );
sendErrorResponse();
