use of io.gravitee.rest.api.service.exceptions.GraviteeDescriptorReadException in project gravitee-management-rest-api by gravitee-io.
the class GraviteeDescriptorServiceImpl method read.
@Override
public GraviteeDescriptorEntity read(String s) {
ObjectMapper mapper = new ObjectMapper();
try {
GraviteeDescriptorEntity descriptorEntity = mapper.readValue(s, GraviteeDescriptorEntity.class);
assertVersion(descriptorEntity);
return descriptorEntity;
} catch (IOException e) {
logger.error("An error occurs while trying to read the descriptor", e);
throw new GraviteeDescriptorReadException("An error occurs while trying to read the descriptor");
}
}
Aggregations