Observed behavior: [bob@a00:~]$ sudo systemctl enable /foo/bar.service Failed to execute operation: Invalid argument Expected behvaior: [bob@a00:~]$ sudo systemctl enable /foo/bar.service Unable to create symbolic link /etc/systemd/system/bar.service: target already exists Details: It seems that the systemd code generally passes error information as a single numeric code, even across contexts where the caller cannot know what the error code applies to. This problem is further exacerbated by systemctl itself not doing any work; attempting to run systemctl under strace will not reveal additional context. I would suggest making a per-thread error description string that takes precedence over errno if set, maybe something like this: https://gist.github.com/mortehu/df056c55958723b6836e
We actually pass back descriptive dbus errors in many cases, but not in all.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.