URL url = apiUrl.buildUrl();
String webpage = requestWebPage(url);
try {
WrapperMovieCasts wrapper = mapper.readValue(webpage, WrapperMovieCasts.class);
TmdbResultsList<Person> results = new TmdbResultsList<Person>(wrapper.getAll());
results.copyWrapper(wrapper);
return results;
} catch (IOException ex) {
LOG.warn("Failed to get movie casts: {}", ex.getMessage(), ex);
throw new MovieDbException(MovieDbExceptionType.MAPPING_FAILED, webpage, url, ex);