Skip to content

Commit

Permalink
Merge pull request #16 from DiSSCo/feature/dump
Browse files Browse the repository at this point in the history
Feature/dump
  • Loading branch information
southeo authored Dec 10, 2024
2 parents 8c99cb5 + 6fc94bf commit 9518f35
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 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
13 changes: 0 additions & 13 deletions src/main/resources/json-schema/digital-media.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,6 @@
"mediaType": {
"type": "string",
"description": "Describes the primary nature of the digital media",
"enum": [
"Collection",
"Dataset",
"Event",
"Image",
"InteractiveResource",
"MovingImage",
"PhysicalObject",
"Service",
"Software",
"Sound",
"Text"
],
"$comment": "idx = 407"
},
"mimeType": {
Expand Down

0 comments on commit 9518f35

Please sign in to comment.