Pass error codes from psql