@@ -54,15 +54,15 @@ func listCerts(c *cli.Context) error {
5454
5555 getResp , err := http .Get (config .SignerUrl + "cert/requests" )
5656 if err != nil {
57- return cli .NewExitError (fmt .Sprintf ("Didn't get a valid response" , err ), 1 )
57+ return cli .NewExitError (fmt .Sprintf ("Didn't get a valid response: %s " , err ), 1 )
5858 }
5959 getRespBuf , err := ioutil .ReadAll (getResp .Body )
6060 if err != nil {
61- return cli .NewExitError (fmt .Sprintf ("Error reading response body" , err ), 1 )
61+ return cli .NewExitError (fmt .Sprintf ("Error reading response body: %s " , err ), 1 )
6262 }
6363 getResp .Body .Close ()
6464 if getResp .StatusCode != 200 {
65- return cli .NewExitError (fmt .Sprintf ("Error getting listing of certs" , string (getRespBuf )), 1 )
65+ return cli .NewExitError (fmt .Sprintf ("Error getting listing of certs: %s " , string (getRespBuf )), 1 )
6666 }
6767
6868 certs := make (certRequestResponse )
@@ -71,11 +71,11 @@ func listCerts(c *cli.Context) error {
7171 if showAll || ! respElement .Signed {
7272 rawCert , err := base64 .StdEncoding .DecodeString (respElement .CertBlob )
7373 if err != nil {
74- return cli .NewExitError (fmt .Sprintf ("Trouble base64 decoding response: " , err , respElement .CertBlob ), 1 )
74+ return cli .NewExitError (fmt .Sprintf ("Trouble base64 decoding response '%s': %s " , err , respElement .CertBlob ), 1 )
7575 }
7676 pubKey , err := ssh .ParsePublicKey (rawCert )
7777 if err != nil {
78- return cli .NewExitError (fmt .Sprintf ("Trouble parsing response:" , err ), 1 )
78+ return cli .NewExitError (fmt .Sprintf ("Trouble parsing response: %s " , err ), 1 )
7979 }
8080 cert := * pubKey .(* ssh.Certificate )
8181 env ,
ok := cert .
Extensions [
"[email protected] " ]
0 commit comments