[ARVADOS] updated: 2.1.0-652-g841a23635

Git user git at public.arvados.org
Thu Apr 15 15:06:47 UTC 2021


Summary of changes:
 sdk/go/keepclient/keepclient.go | 7 +++++++
 1 file changed, 7 insertions(+)

       via  841a23635a458efbfc917a8f0a19f58fe373529f (commit)
      from  e01a688f1e9634c8a9032bd6e78d34ebd47e2c3a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 841a23635a458efbfc917a8f0a19f58fe373529f
Author: Nico Cesar <nico at nicocesar.com>
Date:   Thu Apr 15 11:06:12 2021 -0400

    making MakeKeepClient() fail faster
    
    Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico at curii.com>

diff --git a/sdk/go/keepclient/keepclient.go b/sdk/go/keepclient/keepclient.go
index 454181265..59c284c3d 100644
--- a/sdk/go/keepclient/keepclient.go
+++ b/sdk/go/keepclient/keepclient.go
@@ -122,6 +122,13 @@ type KeepClient struct {
 // DiscoverKeepServices(), and returns when the client is ready to
 // use.
 func MakeKeepClient(arv *arvadosclient.ArvadosClient) (*KeepClient, error) {
+	if arv.ApiServer == "" {
+		return nil, fmt.Errorf("API server is not configured. Maybe env var ARVADOS_API_HOST should be set first?")
+	}
+	if arv.ApiToken == "" {
+		return nil, fmt.Errorf("API token is not configured. Maybe env var ARVADOS_API_TOKEN should be set first?")
+
+	}
 	kc := New(arv)
 	return kc, kc.discoverServices()
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list