fix issue rendering error

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1397247 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-10-11 19:26:02 +00:00
parent deb9f97bcb
commit 7219873f2d
2 changed files with 5 additions and 1 deletions

View File

@ -287,6 +287,10 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) {
*/
displayRestError=function(data,idToAppend){
$.log("displayRestError");
// maybe data is just the response so test if if we have a responseText and transform it to json
if(data.responseText){
data= $.parseJSON(data.responseText);
}
if (data.redbackRestError){
displayRedbackError(archivaRestError,idToAppend)
}