api: clean up repr, improve errors around Table discovery