Skip to content

Commit

Permalink
[PAGOPA-1305] bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
jacopocarlini committed Oct 25, 2023
1 parent c8da920 commit 3aeed5f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/it/gov/pagopa/afm/utils/service/CDIService.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ public void deleteBundlesByIdCDI(String idCdi, String pspCode) {
Optional.ofNullable(marketPlaceClient)
.ifPresent(result -> marketPlaceClient.removeBundle(pspCode, bundle.getId()));
} catch (FeignException.BadRequest e) {
throw new AppException(AppError.BUNDLE_REQUEST_DATA_ERROR, e.getMessage());
// ignore bundle already deleted
if (!e.getMessage().contains("Bundle has been already deleted")){
throw new AppException(AppError.BUNDLE_REQUEST_DATA_ERROR, e.getMessage());
}
} catch (FeignException.NotFound e) {
throw new AppException(AppError.BUNDLE_NOT_FOUND_ERROR, e.getMessage());
} catch (FeignException.Conflict e) {
Expand Down Expand Up @@ -245,7 +248,8 @@ private void addBundleByTouchpoint(
}
if(isNullTouchPoint) {
// default bundle with null touchpoint value
bundleRequestList.add(bundleRequest);
BundleRequest bundleRequestClone = SerializationUtils.clone(bundleRequest);
bundleRequestList.add(bundleRequestClone);
}
}

Expand Down

0 comments on commit 3aeed5f

Please sign in to comment.