[java-identity-provider] branch main updated: IDP-2416 - Capture more output of failed command line invocations

Codeberg noreply at shibboleth.net
Wed Jan 7 15:47:56 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
https://codeberg.org/Shibboleth/java-identity-provider/commit/a2ad82d88347c5f1c9f17ae8b73591cb0c3302e1

The following commit(s) were added to refs/heads/main by this push:
     new a2ad82d88 IDP-2416 - Capture more output of failed command line invocations
a2ad82d88 is described below

commit a2ad82d88347c5f1c9f17ae8b73591cb0c3302e1
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Jan 7 10:47:45 2026 -0500

    IDP-2416 - Capture more output of failed command line invocations
    
    https://shibboleth.atlassian.net/browse/IDP-2416
    
    Explicitly grab status response text if it exists.
---
 idp-cli/src/main/java/net/shibboleth/idp/cli/CLI.java | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/idp-cli/src/main/java/net/shibboleth/idp/cli/CLI.java b/idp-cli/src/main/java/net/shibboleth/idp/cli/CLI.java
index ccde45a19..b21cf4f16 100644
--- a/idp-cli/src/main/java/net/shibboleth/idp/cli/CLI.java
+++ b/idp-cli/src/main/java/net/shibboleth/idp/cli/CLI.java
@@ -171,9 +171,15 @@ public final class CLI {
     private static void errorAndExit(@Nonnull final String errorMessage, @Nullable final HttpURLConnection conn) {
         System.err.println(errorMessage);
         if (conn != null) {
-            try (final InputStream err = conn.getErrorStream()) {
-                if (err != null) {
-                    outputStream(err, System.err);
+            try {
+                final String status = conn.getResponseMessage();
+                if (status != null) {
+                    System.err.println(status);
+                }
+                try (final InputStream err = conn.getErrorStream()) {
+                    if (err != null) {
+                        outputStream(err, System.err);
+                    }
                 }
             } catch (final IOException e) {
             }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list