Skip to content

Improve error handling

Pea Nut requested to merge improve-error-handling into main

This MR is based on !184 (merged). It has some smaller improvments that are now seperated from the big v5 branch (!172 (closed)).

Changes

  • add some http timeouts
  • improve logging for executed commands
  • handle some errors
  • clean the code of the linux helper

TODOs

For Linux: there is a function called hasHelpers(). It currently only checks if there is the bitmask-root helper. It should also check if the polkit file exists.
The question is: How may paths do we have to check? Is it just /usr/share/polkit-1/actions?

golangci-lint run --path-prefix=./... --timeout=5m still shows some things to improve. Most stuff is about the legacy/v3 stuff. I only fixed the important ones.

Edited by Pea Nut

Merge request reports

Loading