From 4c6a9903670bb0c636ee245924260df86588d736 Mon Sep 17 00:00:00 2001 From: Dominik Riemer Date: Tue, 3 Dec 2024 09:30:50 +0100 Subject: [PATCH] fix: Improve exception messages in OPC-UA connector --- .../connectors/opcua/config/security/SecurityConfig.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/streampipes-extensions/streampipes-connectors-opcua/src/main/java/org/apache/streampipes/extensions/connectors/opcua/config/security/SecurityConfig.java b/streampipes-extensions/streampipes-connectors-opcua/src/main/java/org/apache/streampipes/extensions/connectors/opcua/config/security/SecurityConfig.java index b64660ebe9..7e655b7e3b 100644 --- a/streampipes-extensions/streampipes-connectors-opcua/src/main/java/org/apache/streampipes/extensions/connectors/opcua/config/security/SecurityConfig.java +++ b/streampipes-extensions/streampipes-connectors-opcua/src/main/java/org/apache/streampipes/extensions/connectors/opcua/config/security/SecurityConfig.java @@ -56,7 +56,12 @@ public void configureSecurityPolicy(String opcServerUrl, .filter(e -> e.getSecurityPolicyUri().equals(securityPolicy.getUri())) .findFirst() .orElseThrow(() -> - new SpConfigurationException("No endpoint available with security mode {} and security policy {}") + new SpConfigurationException( + String.format( + "No endpoint available with security mode %s and security policy %s", + securityMode, + securityPolicy) + ) ); tmpEndpoint = updateEndpointUrl(tmpEndpoint, host);