[Directory] handle IntegrityError when updating category