datasette / datasette-enrichments

Tools for running enrichments against data stored in Datasette
https://enrichments.datasette.io
Apache License 2.0
16 stars 0 forks source link

Should be an exception you can raise that cancels the run #36

Open simonw opened 7 months ago

simonw commented 7 months ago

If you start getting API key authentication errors for example it's probably best to cancel the whole run rather than trigger the same error for every following batch.

Maybe this:

from datasette_enrichments import CancelException

raise CancelException("Run cancelled due to API authentication error")
simonw commented 7 months ago

Related: