api: return errors.IsA()-testable errors for common failure cases
Open
- Dominant language
- Go
- Stars
- 50
- Forks
- 19
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 6
Description
It could be good in some cases if the package returned easily testable pre-defined(and exported package-specific errors for common failure cases, wrapped in a more specific error messages as necessary. Consumers then could test for the common failure cases and provide more user-friendly error messages on UX-visible interfaces.
If we decide to implement this, it probably would be good if we could differentiate between an unmounted resctrlfs and a potential lack of support for resctrlfs in the kernel altogether (missing `resctrl` from `/proc/filesystems`, when resctrl is either not enabled at all or it is compiled as a module but not loaded).
Contributor guide
Assessment
This issue has not been assessed yet.