mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Log the root error in HandleFindRunnersFailure, when available
This commit is contained in:
@@ -43,7 +43,12 @@ func (tr *placerTracker) IsDone() bool {
|
||||
|
||||
// HandleFindRunnersFailure is a convenience function to record error from runnerpool.Runners()
|
||||
func (tr *placerTracker) HandleFindRunnersFailure(err error) {
|
||||
common.Logger(tr.requestCtx).WithError(err).Error("Failed to find runners for call")
|
||||
logger := common.Logger(tr.requestCtx).WithError(err)
|
||||
w, ok := err.(models.APIErrorWrapper)
|
||||
if ok {
|
||||
logger = logger.WithField("root_error", w.RootError())
|
||||
}
|
||||
logger.Error("Failed to find runners for call")
|
||||
stats.Record(tr.requestCtx, errorPoolCountMeasure.M(0))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user