wakatime / wakatime-cli

Command line interface used by all WakaTime text editor plugins
https://wakatime.com/plugins
BSD 3-Clause "New" or "Revised" License
277 stars 41 forks source link

Control which errors should log on upstream #879

Closed gandarez closed 1 year ago

gandarez commented 1 year ago

Errors like Backoff isn't a real error and should not be considered by the upstream method (aka run) and avoid adding it to the log files.

The implementation should replace the method below

func canLogError(err error) bool {
    return !errors.As(err, &api.ErrBackoff{})
}
alanhamlett commented 1 year ago

Implemented with #878.