php errors reporting through json response