Przeglądaj źródła

Improve POST URL status error (#250)

* Improve POST URL status error

* Mirror the connection error string
Matt Joiner 7 lat temu
rodzic
commit
2fb0552a69
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1
    1
      internal/symbolizer/symbolizer.go

+ 1
- 1
internal/symbolizer/symbolizer.go Wyświetl plik

121
 	}
121
 	}
122
 	defer resp.Body.Close()
122
 	defer resp.Body.Close()
123
 	if resp.StatusCode != http.StatusOK {
123
 	if resp.StatusCode != http.StatusOK {
124
-		return nil, statusCodeError(resp)
124
+		return nil, fmt.Errorf("http post %s: %v", source, statusCodeError(resp))
125
 	}
125
 	}
126
 	return ioutil.ReadAll(resp.Body)
126
 	return ioutil.ReadAll(resp.Body)
127
 }
127
 }