Skip to content

Commit

Permalink
Temp commit
Browse files Browse the repository at this point in the history
  • Loading branch information
QuyenLy87 committed Mar 21, 2023
1 parent eb35ce9 commit a8b47aa
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,18 @@ public BranchMergeJob mergeBranchAsync(MergeRequest mergeRequest) {
} catch (IntegrityException e) {
mergeJob.setStatus(JobStatus.CONFLICTS);
mergeJob.setMessage(e.getMessage());
// try {
// ObjectMapper mapper = new ObjectMapper();
// String apiError = mapper.writeValueAsString(ApiErrorFactory.createErrorForMergeConflicts(e.getMessage(), e.getIntegrityIssueReport()));
// mergeJob.setApiError(apiError);
// } catch (JsonProcessingException ex) {
// throw new RuntimeException(ex);
// }
try {
ObjectMapper mapper = new ObjectMapper();
String apiError = mapper.writeValueAsString(ApiErrorFactory.createErrorForMergeConflicts(e.getMessage(), e.getIntegrityIssueReport()));
mergeJob.setApiError(apiError);
} catch (JsonProcessingException ex) {
throw new RuntimeException(ex);
branchMergeJobRepository.save(mergeJob);
} catch (Exception ex) {
logger.error("Failed to save merge job", ex);
}
branchMergeJobRepository.save(mergeJob);
} catch (Exception e) {
mergeJob.setStatus(JobStatus.FAILED);
mergeJob.setMessage(e.getMessage());
Expand Down

0 comments on commit a8b47aa

Please sign in to comment.