2727from feast .errors import (
2828 ConflictingFeatureViewNames ,
2929 FeatureViewNotFoundException ,
30- OnDemandFeatureViewNotFoundException ,
31- StreamFeatureViewNotFoundException ,
3230)
3331from feast .feature_service import FeatureService
3432from feast .feature_view import FeatureView
@@ -293,24 +291,25 @@ def _check_conflict(getter, not_found_exc, existing_type: str):
293291 pass
294292
295293 # Check StreamFeatureView before FeatureView since StreamFeatureView is a subclass
294+ # Note: All getters raise FeatureViewNotFoundException (not type-specific exceptions)
296295 if isinstance (feature_view , StreamFeatureView ):
297296 _check_conflict (
298297 self .get_feature_view , FeatureViewNotFoundException , "FeatureView"
299298 )
300299 _check_conflict (
301300 self .get_on_demand_feature_view ,
302- OnDemandFeatureViewNotFoundException ,
301+ FeatureViewNotFoundException ,
303302 "OnDemandFeatureView" ,
304303 )
305304 elif isinstance (feature_view , FeatureView ):
306305 _check_conflict (
307306 self .get_stream_feature_view ,
308- StreamFeatureViewNotFoundException ,
307+ FeatureViewNotFoundException ,
309308 "StreamFeatureView" ,
310309 )
311310 _check_conflict (
312311 self .get_on_demand_feature_view ,
313- OnDemandFeatureViewNotFoundException ,
312+ FeatureViewNotFoundException ,
314313 "OnDemandFeatureView" ,
315314 )
316315 elif isinstance (feature_view , OnDemandFeatureView ):
@@ -319,7 +318,7 @@ def _check_conflict(getter, not_found_exc, existing_type: str):
319318 )
320319 _check_conflict (
321320 self .get_stream_feature_view ,
322- StreamFeatureViewNotFoundException ,
321+ FeatureViewNotFoundException ,
323322 "StreamFeatureView" ,
324323 )
325324
0 commit comments