daemon, client: Set error kind when can't refresh snap that is busy.
This is a normal use case for a client, so we want to be able to distinguish this from other refresh errors.
Was noticed in https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2484
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 78.92%. Comparing base (
2b48274) to head (bac3ad8). Report is 12 commits behind head on master.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #13729 +/- ##
==========================================
+ Coverage 78.91% 78.92% +0.01%
==========================================
Files 1043 1043
Lines 134345 134427 +82
==========================================
+ Hits 106014 106095 +81
- Misses 21719 21720 +1
Partials 6612 6612
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 78.92% <100.00%> (+0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
As a side note, we need to update the docs when this lands https://snapcraft.io/docs/snapd-error-codes
This will be used by gnome-software, which tries to update multiple snaps (i.e. the equivalent of refresh all). One snap being busy makes the whole update look like it failed and the user is notified; the desired behaviour is to ignore those snaps that are busy, much like the refreshAll logic above.