Skip to content

Commit

Permalink
fix(imagor): fix context error propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
cshum committed Aug 21, 2022
1 parent 9be89de commit d843c6c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions imagor.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,16 +311,16 @@ func (app *Imagor) Do(r *http.Request, p imagorpath.Params) (blob *Blob, err err
app.Logger.Debug("processed", zap.Any("params", p))
}
break
} else if e == ErrPass {
if !isBlobEmpty(b) {
// pass to next processor
blob = b
}
if app.Debug {
app.Logger.Debug("process", zap.Any("params", p), zap.Error(e))
}
} else {
if e == ErrPass {
if !isBlobEmpty(b) {
// pass to next processor
blob = b
}
if app.Debug {
app.Logger.Debug("process", zap.Any("params", p), zap.Error(e))
}
} else if ctx.Err() == nil {
if ctx.Err() == nil {
err = e
app.Logger.Warn("process", zap.Any("params", p), zap.Error(err))
} else {
Expand Down

0 comments on commit d843c6c

Please sign in to comment.