return the postgres error message in case of an error