Skip to content

Commit

Permalink
utils: compare lower case
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Mar 13, 2024
1 parent 3da4fff commit 04d0978
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/utils/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ func IsErr(err error, target error) bool {
} else if errors.Is(err, target) {
return true
}
return strings.Contains(err.Error(), target.Error())
// TODO: we can get rid of the lower casing once siad is gone and
// renterd/hostd use the same error messages
return strings.Contains(strings.ToLower(err.Error()), strings.ToLower(target.Error()))
}

0 comments on commit 04d0978

Please sign in to comment.