Skip to content

Handle errors properly #6

Description

@ZoopOTheGoop

Currently we just unwrap a lot as a proof of concept, but a lot of things should not be unwrapped, particularly since a lot of bugs can be caused by non-fatal errors (e.g. a connection not being available or a snap's name not being in a certain query).

This is a breaking API change but oh well.

Note that some unwraps are valid - either we know for sure the unwrap is sound (e.g. check with is_none etc first) or we call expect because a flaw can only come from an internal error and needs to be fixed rather than reported to the user. These should stay.

This includes detecting and handling snapd's ErrorKind.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions