Skip to content

Commit 7e316eb

Browse files
authored
fix: cache/gcs dropped errs (#938)
1 parent a7bf004 commit 7e316eb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cache/gcs/gcs.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,21 @@ func New(config dict.Dicter) (cache.Interface, error) {
4747
}
4848

4949
gcsCache.Basepath, err = config.String(ConfigKeyBasepath, nil)
50+
if err != nil {
51+
return nil, err
52+
}
53+
5054
defaultMaxZoom := uint(tegola.MaxZ)
55+
5156
gcsCache.MaxZoom, err = config.Uint(ConfigKeyMaxZoom, &defaultMaxZoom)
57+
if err != nil {
58+
return nil, err
59+
}
5260

5361
gcsCache.Ctx = context.Background()
5462
client, err := storage.NewClient(gcsCache.Ctx)
5563
if err != nil {
56-
log.Fatal(err)
64+
return nil, err
5765
}
5866
gcsCache.Client = client
5967
gcsCache.Bucket = client.Bucket(gcsCache.BucketName)

0 commit comments

Comments
 (0)