Errorcallback - how to return back the error in correct json format
Errorcallback - how to return back the error in correct json format

I am using from salesforce
In the ajax :
ajax: function ( method, url, data, successCallback, errorCallback ) {
if ((mType === 'Hot') && moperation ==='Delete')
{
alert('this cannot be deleted ');
return errorCallback( {"error": "this record cannot be deleted"} );
}
}
I am getting the system error occurred as I think the json is not correct . what is the right format .
This discussion has been closed.