Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adding the poll failure response details to db #3826

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
return common.PollStatusResponse{
StatusCode: 500,
HasFailed: true,
Error: asyncResponse.Error,

Check warning on line 94 in router/batchrouter/asyncdestinationmanager/marketo-bulk-upload/marketobulkupload.go

View check run for this annotation

Codecov / codecov/patch

router/batchrouter/asyncdestinationmanager/marketo-bulk-upload/marketobulkupload.go#L94

Added line #L94 was not covered by tests
}
}
return asyncResponse
Expand Down
2 changes: 1 addition & 1 deletion router/batchrouter/handle_async.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
brt.asyncAbortedJobCount.Count(len(statusList))
brt.updateProcessedEventsMetrics(statusList)
} else {
statusList, abortedJobsList := brt.prepareJobStatusList(importingList, jobsdb.JobStatusT{JobState: jobsdb.Failed.State, ErrorResponse: misc.UpdateJSONWithNewKeyVal(routerutils.EmptyPayload, "error", "poll failed")})
statusList, abortedJobsList := brt.prepareJobStatusList(importingList, jobsdb.JobStatusT{JobState: jobsdb.Failed.State, ErrorResponse: misc.UpdateJSONWithNewKeyVal(routerutils.EmptyPayload, "error", pollResp.Error)})

Check warning on line 241 in router/batchrouter/handle_async.go

View check run for this annotation

Codecov / codecov/patch

router/batchrouter/handle_async.go#L241

Added line #L241 was not covered by tests
if err := brt.updateJobStatuses(ctx, destinationID, importingList, abortedJobsList, statusList); err != nil {
brt.logger.Errorf("[Batch Router] Failed to update job status for Dest Type %v with error %v", brt.destType, err)
return statusList, err
Expand Down
Loading