use trace logging for context errors

This commit is contained in:
Brad Rydzewski
2019-11-15 12:57:19 -08:00
parent 6dace0adc9
commit 6c9e3ac5c0
2 changed files with 9 additions and 0 deletions

View File

@@ -1,6 +1,11 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Changed
- use trace level logging for context errors
## 1.0.1 ## 1.0.1
### Fixed ### Fixed

View File

@@ -56,6 +56,10 @@ func (p *Poller) poll(ctx context.Context, thread int) error {
// request a new build stage for execution from the central // request a new build stage for execution from the central
// build server. // build server.
stage, err := p.Client.Request(ctx, p.Filter) stage, err := p.Client.Request(ctx, p.Filter)
if err == context.Canceled || err == context.DeadlineExceeded {
log.WithError(err).Trace("no stage returned")
return nil
}
if err != nil { if err != nil {
log.WithError(err).Error("cannot request stage") log.WithError(err).Error("cannot request stage")
return err return err