Use error instead of unit for temp types