From 754e007d87039b32270107fe2bd8c8a43d3dfa32 Mon Sep 17 00:00:00 2001 From: Michiel Meeuwissen Date: Tue, 9 Jan 2024 17:04:24 +0100 Subject: [PATCH] Details. --- client-core/src/main/java/nl/vpro/api/client/utils/Config.java | 1 + .../src/main/java/nl/vpro/api/client/utils/Swagger.java | 3 ++- .../main/java/nl/vpro/api/client/frontend/NpoApiClients.java | 2 +- pom.xml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client-core/src/main/java/nl/vpro/api/client/utils/Config.java b/client-core/src/main/java/nl/vpro/api/client/utils/Config.java index 327e5670..5f018db5 100644 --- a/client-core/src/main/java/nl/vpro/api/client/utils/Config.java +++ b/client-core/src/main/java/nl/vpro/api/client/utils/Config.java @@ -42,6 +42,7 @@ public enum Prefix { media_api_backend(Deployment.media_api_backend), parkpost(null), media_api_backend_rcrs(null), + media_api_backend_prepr(null), pages_publisher(Deployment.pages_publisher), media_publisher(Deployment.media_publisher), media(Deployment.media), diff --git a/client-core/src/main/java/nl/vpro/api/client/utils/Swagger.java b/client-core/src/main/java/nl/vpro/api/client/utils/Swagger.java index 59648932..f3622e36 100644 --- a/client-core/src/main/java/nl/vpro/api/client/utils/Swagger.java +++ b/client-core/src/main/java/nl/vpro/api/client/utils/Swagger.java @@ -4,6 +4,7 @@ import java.io.IOException; import java.io.InputStream; +import java.net.ConnectException; import java.net.URI; import java.net.http.*; import java.time.Duration; @@ -71,7 +72,7 @@ public static VersionResult getVersionFromSwagger(String baseUrl, String default log.warn("No swagger found at {} -> {}", url, response.statusCode()); return VersionResult.builder().version(defaultVersion).available(false).build(); } - } catch (JsonParseException ex) { + } catch (JsonParseException | ConnectException ex) { log.warn(url + ": " + ex.getMessage(), ex); return VersionResult.builder().version(defaultVersion).available(false).build(); } catch (IOException | InterruptedException ex) { diff --git a/frontend-api-client/src/main/java/nl/vpro/api/client/frontend/NpoApiClients.java b/frontend-api-client/src/main/java/nl/vpro/api/client/frontend/NpoApiClients.java index bf8f155f..724fcc86 100644 --- a/frontend-api-client/src/main/java/nl/vpro/api/client/frontend/NpoApiClients.java +++ b/frontend-api-client/src/main/java/nl/vpro/api/client/frontend/NpoApiClients.java @@ -331,7 +331,7 @@ public String getVersion() { } - public boolean isAvailable() { + public boolean isAvailable() { getVersion(); return version.get().isAvailable(); } diff --git a/pom.xml b/pom.xml index 507ea233..3722cf82 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ nl.vpro.poms poms-parent - 7.10.1 + 7.11-SNAPSHOT nl.vpro.poms.api-clients api-client-parent