// convert them to hide stupid "old" REST model, and not have it leak out
final List<ErrorMessage> errors = Lists.newArrayList();
for (org.sonatype.nexus.client.internal.msg.ErrorMessage message : errorResponse.getErrors()) {
errors.add(new NexusClientErrorResponseException.ErrorMessage(message.getId(), message.getMsg()));
}
throw new NexusClientErrorResponseException(
response.getClientResponseStatus().getReasonPhrase(),
body,
errors
);
}