displaySuccessMessage( $.i18n.prop('artifact.deleted'));
},
error:function(data){
- displayRestError(data,"user-messages");
+ displayRestError( data,"user-messages");
},
complete:function(){
closeDialogConfirm();
*/
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)
}