mirror of
https://github.com/SSLMate/certspotter.git
synced 2025-06-27 10:15:33 +02:00
Improve formatting of an error message
This commit is contained in:
parent
cfe7df0b9f
commit
37531001bc
@ -11,6 +11,7 @@
|
||||
package ctclient
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
@ -79,7 +80,7 @@ func get(ctx context.Context, httpClient *http.Client, fullURL string) ([]byte,
|
||||
}
|
||||
|
||||
if response.StatusCode != 200 {
|
||||
return nil, fmt.Errorf("Get %q: %s (%q)", fullURL, response.Status, string(responseBody))
|
||||
return nil, fmt.Errorf("Get %q: %s (%q)", fullURL, response.Status, bytes.TrimSpace(responseBody))
|
||||
}
|
||||
|
||||
return responseBody, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user