From 1a75344727f009a94f8641fee7ceef6ecebf7776 Mon Sep 17 00:00:00 2001 From: sgiannopoulos Date: Fri, 17 May 2024 10:09:11 +0300 Subject: [PATCH] bug fix --- .../service/zenodo/ZenodoDepositServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/opencdmp/deposit/zenodorepository/service/zenodo/ZenodoDepositServiceImpl.java b/core/src/main/java/org/opencdmp/deposit/zenodorepository/service/zenodo/ZenodoDepositServiceImpl.java index 50b76a6..03aa50c 100644 --- a/core/src/main/java/org/opencdmp/deposit/zenodorepository/service/zenodo/ZenodoDepositServiceImpl.java +++ b/core/src/main/java/org/opencdmp/deposit/zenodorepository/service/zenodo/ZenodoDepositServiceImpl.java @@ -184,7 +184,7 @@ public class ZenodoDepositServiceImpl implements ZenodoDepositService { String newVersionUrl = links.get(ZENODO_LINKS_LATEST_DRAFT) + "/actions/newversion" + "?access_token=" + zenodoToken; logger.debug("new version url: " + newVersionUrl); createResponse = zenodoClient.post().uri(newVersionUrl) - .bodyValue(null).exchangeToMono(mono -> + .exchangeToMono(mono -> mono.statusCode().isError() ? mono.createException().flatMap(Mono::error) : mono.bodyToMono(new ParameterizedTypeReference>>() {})