I have a couple of bath jobs which runs everyday and it usually throws 2 kinds of error on failure:
"psycopg2.DataError" & "broadcastyearweek"