Index: branches/pap/tools/errors.pl
===================================================================
--- branches/pap/tools/errors.pl	(revision 28179)
+++ branches/pap/tools/errors.pl	(revision 28484)
@@ -78,4 +78,12 @@
     $label_table = "magicDSRun";
     $fault_table = "magicDSFile";
+} elsif ($stage eq "publish") {
+    $sql = "SELECT pub_id, client_id, hostname, path_base FROM publishRun JOIN publishDone USING(pub_id) WHERE fault != 0 AND state = 'new'";
+    $label_table = "publishRun";
+    $fault_table = "publishDone";
+} elsif ($stage eq "diffphot") {
+    $sql = "SELECT diff_phot_id, skycell_id, hostname, path_base FROM diffPhotRun JOIN diffPhotSkyfile USING(diff_phot_id) WHERE fault != 0 AND state = 'new'";
+    $label_table = "diffPhotRun";
+    $fault_table = "diffPhotSkycell";
 } else {
     die "Unsupported stage: $stage\n";
