@@ -912,7 +912,7 @@ def bands(self) -> list[ModelBand] | list[str]:
912912        elif  isinstance (bands , list ) and  all (isinstance (item , dict ) for  item  in  bands ):
913913            return  [ModelBand (band ) for  band  in  bands  if  isinstance (band , dict )]
914914
915-         raise  STACError ("Invalid bands property. Must list[str] or list[ModelBand]" )
915+         raise  TypeError ("Invalid bands property. Must list[str] or list[ModelBand]" )
916916
917917    @bands .setter  
918918    def  bands (self , v : list [ModelBand ] |  list [str ]) ->  None :
@@ -1454,7 +1454,7 @@ def ext(cls, obj: T, add_if_missing: bool = False) -> MLMExtension[T]:
14541454            MLMExtension[T]: The extended object 
14551455
14561456        Raises: 
1457-             pystac.STACError : When a :class:`pystac.Asset` object is apssed as the 
1457+             pystac.TypeError : When a :class:`pystac.Asset` object is apssed as the 
14581458                `obj` parameter 
14591459            pystac.ExtensionTypeError: When any unsupported object is passed as the 
14601460                `obj` parameter. If you see this extension in this context, please 
@@ -1470,7 +1470,7 @@ def ext(cls, obj: T, add_if_missing: bool = False) -> MLMExtension[T]:
14701470            cls .ensure_owner_has_extension (obj , add_if_missing )
14711471            return  cast (MLMExtension [T ], ItemAssetMLMExtension (obj ))
14721472        elif  isinstance (obj , pystac .Asset ):
1473-             raise  pystac . STACError (
1473+             raise  TypeError (
14741474                "This class cannot be used to extend STAC objects of type Assets. " 
14751475                "To extend Asset objects, use either AssetGeneralMLMExtension or " 
14761476                "AssetDetailedMLMExtension" 
@@ -1739,7 +1739,7 @@ def __init__(self, asset: pystac.Asset):
17391739    @classmethod  
17401740    def  _ext (cls : type [AssetExtensionType ], obj : pystac .Asset ) ->  AssetExtensionType :
17411741        if  not  isinstance (obj , pystac .Asset ):
1742-             raise  STACError (
1742+             raise  TypeError (
17431743                "This class can only be used to extend Assets. " 
17441744                "For Items and Collections use MLMExtension." 
17451745            )
0 commit comments