fix(sentry): skip "daemon not running" stop/reload errors
This commit is contained in:
parent
fceadd2009
commit
4d7444ef5b
6 changed files with 90 additions and 12 deletions
|
|
@ -9,6 +9,8 @@ import (
|
|||
|
||||
gosentry "github.com/getsentry/sentry-go"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
"github.com/torrentclaw/unarr/internal/agent"
|
||||
)
|
||||
|
||||
// dsn is injected at build time via ldflags. If empty, Sentry is disabled.
|
||||
|
|
@ -63,6 +65,9 @@ func CaptureError(err error, command string) {
|
|||
}
|
||||
|
||||
func isUserInputError(err error) bool {
|
||||
if errors.Is(err, agent.ErrDaemonNotRunning) {
|
||||
return true
|
||||
}
|
||||
var notExist *pflag.NotExistError
|
||||
var valueReq *pflag.ValueRequiredError
|
||||
var invalidVal *pflag.InvalidValueError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue