raise error for failed queries in pgmoon