Closed stuartlynn closed 3 weeks ago
Initial ideas for error type but see code to enrich this:
enum PopgetterError {
FailedConnection,
#[thiserror("")]
MetricNotFound,
/// Bad search syntax
InvalidSearchQuery,
/// Non-existent geometry for metric requested
NonExistentGeometry
}
Next step: add this basic enum as a start to a module and enrich as we go
We are currently using anyhoo to propagate errors easily. This makes sense to continue using in the CLI but the library should define and use internal structured errors. We should switch from using anyhow in the library to using thiserror to define solid error types.