From 2fb5b2afbeb5ced0554008eb49facc89b15368c2 Mon Sep 17 00:00:00 2001 From: Per Cederberg Date: Tue, 8 Oct 2024 16:47:28 +0200 Subject: [PATCH] http: Improved error handling for incorrect URLs --- .../rapidcontext/app/plugin/http/HttpRequestProcedure.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugin/http/src/org/rapidcontext/app/plugin/http/HttpRequestProcedure.java b/src/plugin/http/src/org/rapidcontext/app/plugin/http/HttpRequestProcedure.java index 1f61052f..d8ede333 100644 --- a/src/plugin/http/src/org/rapidcontext/app/plugin/http/HttpRequestProcedure.java +++ b/src/plugin/http/src/org/rapidcontext/app/plugin/http/HttpRequestProcedure.java @@ -229,8 +229,8 @@ private static URL getUrl(Bindings bindings, HttpChannel con) } else { return new URI(str).toURL(); } - } catch (MalformedURLException | URISyntaxException e) { - throw new ProcedureException("invalid URL: " + str); + } catch (MalformedURLException | URISyntaxException | IllegalArgumentException e) { + throw new ProcedureException("invalid URL; " + e.getMessage() + ": "+ str); } }