Skip to content

Commit

Permalink
fix 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
southeo committed Dec 9, 2024
1 parent 1f099dc commit ef5684b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ static class LocationXml {
String href;
String id;
String weight;
String view;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class KafkaConsumerService {
@Qualifier("objectMapper")
private final ObjectMapper mapper;
private final DataCitePublisherService service;
private static final String ERROR_MSG = "Unable to parse specimen event from the handle API";
private static final String ERROR_MSG = "Unable to parse {} event from the handle API";

@RetryableTopic(
attempts = "1",
Expand All @@ -39,7 +39,7 @@ public void getSpecimenMessages(@Payload String message) throws DataCiteApiExcep
var event = mapper.readValue(message, DigitalSpecimenEvent.class);
service.handleMessages(event);
} catch (JsonProcessingException e) {
log.error(ERROR_MSG, e);
log.error(ERROR_MSG, "specimen", e);
log.info("Message: {}", message);
throw new InvalidRequestException();
}
Expand All @@ -54,7 +54,7 @@ public void getMediaMessages(@Payload String message) throws DataCiteApiExceptio
var event = mapper.readValue(message, DigitalMediaEvent.class);
service.handleMessages(event);
} catch (JsonProcessingException e) {
log.error(ERROR_MSG);
log.error(ERROR_MSG, "media", e);
log.info("Message: {}", message);
throw new InvalidRequestException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ private DcRequest buildDcRequest(String xmlLoc, String landingPage, String altId
.build()
).build();
} catch (InvalidFdoProfileReceivedException e) {
log.error("Unable to parse Fdo Profile", e);
throw new DataCiteMappingException();
}
}
Expand Down

0 comments on commit ef5684b

Please sign in to comment.