File tree Expand file tree Collapse file tree
src/main/java/com/bettercloud/vault/api/pki Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import com .bettercloud .vault .rest .Rest ;
99import com .bettercloud .vault .rest .RestResponse ;
1010
11+ import java .util .Arrays ;
1112import java .util .List ;
1213import java .util .stream .Collectors ;
1314
@@ -455,7 +456,8 @@ public PkiResponse issue(
455456
456457 // Validate response
457458 if (restResponse .getStatus () != 200 && restResponse .getStatus () != 404 ) {
458- throw new VaultException ("Vault responded with HTTP status code: " + restResponse .getStatus (), restResponse .getStatus ());
459+ String body = restResponse .getBody () != null ? new String (restResponse .getBody ()) : "(no body)" ;
460+ throw new VaultException ("Vault responded with HTTP status code: " + restResponse .getStatus () + " " + body , restResponse .getStatus ());
459461 }
460462 return new PkiResponse (restResponse , retryCount );
461463 } catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments