use correct error category_type