[ARVADOS] created: 1.1.4-247-g7da2c48
Git user
git at public.curoverse.com
Thu May 10 11:36:02 EDT 2018
at 7da2c48e181298f5b5d1691de76603b9e92ec9d6 (commit)
commit 7da2c48e181298f5b5d1691de76603b9e92ec9d6
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Thu May 10 11:33:48 2018 -0400
9918: Don't mask http/network error with response body format error.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/sdk/go/arvados/keep_service.go b/sdk/go/arvados/keep_service.go
index 9797440..0c86635 100644
--- a/sdk/go/arvados/keep_service.go
+++ b/sdk/go/arvados/keep_service.go
@@ -127,6 +127,13 @@ func (s *KeepService) index(c *Client, url string) ([]KeepServiceIndexEntry, err
scanner := bufio.NewScanner(resp.Body)
sawEOF := false
for scanner.Scan() {
+ if scanner.Err() != nil {
+ // If we encounter a read error (timeout,
+ // connection failure), stop now and return it
+ // below, so it doesn't get masked by the
+ // ensuing "badly formatted response" error.
+ break
+ }
if sawEOF {
return nil, fmt.Errorf("Index response contained non-terminal blank line")
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list