Skip to content

Hard-to-understand error messages from the CLI #130

Closed
@gadomski

Description

@gadomski

As raised in #113, it can be hard to know why a given CLI command is failing, as the Exception __str__ may or may not point the user to the source of a problem. E.g., in #113 the type field was incorrect at the /collections endpoint, but you couldn't really tell that from the error message, which was ... big long printout of the collection ... is not a CollectionClient instance.

Similar issues exist, e.g. in stactools stac-utils/stactools#208. At least for the subset of exceptions that are caused by malformed STAC items, we could do some sort of validation or schema checking on the offending item and report where the issue is. This may be something better suited to PySTAC itself (e.g. in a custom Exception type that contains information about why a given JSON object could not be turned into a STAC object).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions