stac-utils / stac-fastapi-sqlalchemy

PostgreSQL backend for stac-fastapi using SQLAlchemy
MIT License
9 stars 10 forks source link

Better error message when deleting collection with children #28

Open geospatial-jeff opened 3 years ago

geospatial-jeff commented 3 years ago

ForeignKeyViolation returns an error message that makes sense within the context of creating an item that does not have a parent collection, but makes no sense when deleting a collection with children. I think generally we need a better way to inject error handling logic, because exceptions mean different things based on the context.

Ref stac-utils/stac-fastapi#78