Correct error code for deleted objects