MNT-9401: CLONE - After Installed Records Management AMP in alfresco.log "Invalid JSON" error.

Log warning instead of throwing WebScriptException if invalid POST modelsdiff request was sent by SOLR. It can happen if SOLR starts sent requests while Alfresco is not up.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55476 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Pavel Yurke
2013-09-18 15:55:35 +00:00
parent a326b7a01c
commit a9786e1c99

View File

@@ -52,7 +52,17 @@ public class AlfrescoModelsDiff extends DeclarativeWebScript
}
catch(JSONException e)
{
throw new WebScriptException("Invalid JSON", e);
if (logger.isDebugEnabled())
{
logger.warn("Unable to fetch model changes from " + req, e);
}
else
{
logger.warn("Unable to fetch model changes from " + req);
}
status.setCode(Status.STATUS_BAD_REQUEST, "Unable to fetch model changes from " + req);
status.setException(e);
return null;
}
}