diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f9df1972..a059ffecf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ - Self links no longer included in Items for "relative published" catalogs ([#725](https://github.com/stac-utils/pystac/pull/725)) - Adding New and Custom Extensions tutorial now up-to-date with new extensions API ([#724](https://github.com/stac-utils/pystac/pull/724)) +- Clarify error message when using `PropertyExtension.ext(..., add_if_missing=True)` on an `Asset` + with no owner([#746](https://github.com/stac-utils/pystac/pull/746)) - Type errors when initializing `TemporalExtent` using a list of `datetime` objects ([#744](https://github.com/stac-utils/pystac/pull/744)) ### Deprecated diff --git a/pystac/extensions/base.py b/pystac/extensions/base.py index 9c950e9e6..28ae84227 100644 --- a/pystac/extensions/base.py +++ b/pystac/extensions/base.py @@ -151,7 +151,8 @@ def validate_owner_has_extension( if asset.owner is None: if add_if_missing: raise pystac.STACError( - "Can only add schema URIs to Assets with an owner." + "Attempted to use add_if_missing=True for an Asset with no owner. " + "Use Asset.set_owner or set add_if_missing=False." ) else: return