Some Delta Sync errors logged at WARN level should be DEBUG
Description
The change in PR #4457 was intended to log warnings returned to us from go-fleecedelta, and everything else at debug level - but this isn't working as intended due to a quirk in the way error type alises are handled in Go.
Probably need to switch to use an errors.Is/errors.As approach anyway here, so might as well do that as part of the fix.
The change in PR #4457 was intended to log warnings returned to us from go-fleecedelta, and everything else at debug level - but this isn't working as intended due to a quirk in the way error type alises are handled in Go.
Probably need to switch to use an errors.Is/errors.As approach anyway here, so might as well do that as part of the fix.
This can be seen this Go playground example:
https://play.golang.org/p/NRul8FTrQsP
Where err1 is untyped, err2 is trying to be typed with an error type alias but failing, and err3 is a correct implementation of a typed error.