Deal with 404 response when checking for artifacts

This commit is contained in:
Phillip Webb 2020-07-23 18:23:24 -07:00
parent 53296cd161
commit d69c35a1db
1 changed files with 7 additions and 2 deletions

View File

@ -101,8 +101,13 @@ public class BintrayService {
try {
waitAtMost(timeout).with().pollDelay(Duration.ZERO).pollInterval(pollInterval).until(() -> {
logger.debug("Checking bintray");
PackageFile[] published = this.restTemplate.exchange(request, PackageFile[].class).getBody();
return hasPublishedAll(published, requiredDigests);
try {
PackageFile[] published = this.restTemplate.exchange(request, PackageFile[].class).getBody();
return hasPublishedAll(published, requiredDigests);
}
catch (HttpClientErrorException.NotFound ex) {
return false;
}
});
}
catch (ConditionTimeoutException ex) {