`snaphelpers` getting snap config can fail when `snapd` is unavailable`
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
This is a [suggestion](https://github.com/snapcore/snapcraft/pull/3971#pullrequestreview-1165612553) from @cmatsuoka to port some error handling from snapcraft to charmcraft:
When charmcraft uses the `snaphelpers` library calls to fetch the snap config (e.g. `snap get charmcraft`), it can raise an `AttributeError` or `snaphelpers.SnapCtlError` if `snapd` is unavailable. The error messages are very unhelpful.
Snapcraft solved this by wrapping the `snaphelpers` calls in a try/except block and a better error message ([source](https://github.com/snapcore/snapcraft/blob/main/snapcraft/snap_config.py))
Evaluation history
No evaluation history available.