Skip to content

Commit

Permalink
Added recover method for update case v2 methods as the current retrya…
Browse files Browse the repository at this point in the history
…ble annotation for v2 doesn't have recover method (#1589)

* Added recover method for update case v2

* Added recover method with matching params

* Added Retryable on outer method

* Update recover params

* Added recover for all update case v2 and trigger events

* Trigger update case without retry from parent method

* Refactor recover handlers

* Add generic recover method

---------

Co-authored-by: alivenichoppa <[email protected]>
Co-authored-by: sanjayparekh-hmcts <[email protected]>
  • Loading branch information
3 people authored Aug 13, 2024
1 parent bb70f4f commit f1b2991
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,13 @@ public void setSupplementaryData(IdamTokens idamTokens, Long caseId, Map<String,
ccdClient.setSupplementaryData(idamTokens, caseId, supplementaryData);
}

}
/**
* Need to provide this so that recoverable/non-recoverable exception doesn't get wrapped in an IllegalArgumentException
*/
@Recover
public SscsCaseDetails recoverUpdateCaseV2(RuntimeException exception, Long caseId, String eventType) {
log.error("In recover method(recoverUpdateCaseV2) for caseId {} and eventType {}", caseId, eventType);
throw exception;
}

}

0 comments on commit f1b2991

Please sign in to comment.