aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/main.go b/client/main.go
index 10a3646..c5f28f9 100644
--- a/client/main.go
+++ b/client/main.go
@@ -46,12 +46,12 @@ func send(s []byte, token string) (*lib.SignResponse, error) {
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token))
client := &http.Client{}
resp, err := client.Do(req)
- if resp.StatusCode != http.StatusOK {
- return nil, fmt.Errorf("Bad response from server: %s", resp.Status)
- }
if err != nil {
return nil, err
}
+ if resp.StatusCode != http.StatusOK {
+ return nil, fmt.Errorf("Bad response from server: %s", resp.Status)
+ }
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {