ckanapi
ckanapi copied to clipboard
Handle CLI errors more gracefully
Things like:
- errors raised as part of a
ckanapi actioncall - badly formatted JSONL input
- unexpected errors when using
ckanapi dumporckanapi loadwith a local CKAN instance
all result in tracebacks, but aren't ckanapi bugs. We should catch these and display them better. Perhaps with an attractive shade of red text.
I've just bumped into ckanapi load crashing after importing 20k datasets because codec can't encode character. It might be useful to allow the load to carry on, after some types of errors, to the end and allow users to redirect stderr somewhere as a log to handle them later?