Skip to content

Commit

Permalink
fix: add error logs for handle async for visibility of error
Browse files Browse the repository at this point in the history
  • Loading branch information
utsabc committed Oct 30, 2024
1 parent c18d8be commit 7a75102
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router/batchrouter/handle_async.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ func (brt *Handle) updatePollStatusToDB(
brt.asyncFailedJobsTimeStat.Since(startFailedJobsPollTime)

if uploadStatsResp.StatusCode != http.StatusOK {
brt.logger.Errorf("[Batch Router] Failed to fetch failed jobs for Dest Type %v with statusCode %v", brt.destType, uploadStatsResp.StatusCode)
return statusList, errors.New("failed to fetch failed jobs")
brt.logger.Errorf("[Batch Router] Failed to fetch failed jobs for Dest Type %v with statusCode %v , error %v", brt.destType, uploadStatsResp.StatusCode, uploadStatsResp.Error)
return statusList, errors.New(fmt.Sprintf("failed to fetch failed jobs error %v", uploadStatsResp.Error))

Check failure on line 183 in router/batchrouter/handle_async.go

View workflow job for this annotation

GitHub Actions / lint

S1028: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (gosimple)
}

var completedJobsList []*jobsdb.JobT
Expand Down

0 comments on commit 7a75102

Please sign in to comment.