There is an error message from the API, but no specific error kind. I
believe in the past the security center presented any error from the API
directly to the user in a red box, but this doesn't seem to be the case
anymore. Either way, we can have nicer handling :)

The fact that the error comes from configcore as a result of snap set
system experimental.apparmor-prompting=false means a special error kind
can’t be wired in from the prompting-specific code
(https://github.com/canonical/snapd/blob/master/overlord/configstate/configcore/prompting.go#L137),
so we’ll need to add some handling for the API endpoint which handles
snap set system calls. But this shouldn't be too bad, if this is the
preferred approach.

The temporary workaround would be to look at the error string and
present a nice message to the user depending on the particular problem.
Here are all the error strings we might expect to see when trying and
failing to enable prompting:
https://github.com/canonical/snapd/blob/master/overlord/configstate/configcore/prompting.go#L119-L143.
The proper fix will probably want separate error kinds for each of these
potential errors (maybe conflate the errors for prompting unsupported
and prompting unsupported on core).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2144624

Title:
  desktop-security-center fails silently when prompting-client not
  installed: snapd error required to address

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2144624/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to