Skip to content

Commit

Permalink
Reconnect to SF if errors occur
Browse files Browse the repository at this point in the history
Resolves: canonical#51
  • Loading branch information
dosaboy committed Aug 24, 2023
1 parent 4cca2e3 commit 1582905
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ func (runner *ReportRunner) UploadAndSaveReport(report *ReportToExecute, caseNum

logrus.Infof("Getting case from salesforce number: %s", caseNumber)
sfCase, err := runner.SalesforceClient.GetCaseByNumber(caseNumber)
if err != nil {
logrus.Warnf("Creating new SF client since current one is failing")
runner.SalesforceClient = common.NewSalesforceClient
sfCase, err := runner.SalesforceClient.GetCaseByNumber(caseNumber)
}
if err != nil {
return err
}
Expand Down

0 comments on commit 1582905

Please sign in to comment.