Mercurial > gemma
diff pkg/controllers/cross.go @ 838:03e966b71a88
cross profile controller: Handle real errors before checking if there is no matching survey.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 28 Sep 2018 10:25:09 +0200 |
parents | 232f3f345cf0 |
children | a244b18cb916 |
line wrap: on
line diff
--- a/pkg/controllers/cross.go Fri Sep 28 10:17:31 2018 +0200 +++ b/pkg/controllers/cross.go Fri Sep 28 10:25:09 2018 +0200 @@ -95,6 +95,11 @@ csi.Properties.Bottleneck, csi.Properties.Date.Time, conn, req.Context()) + log.Printf("loading octree took: %s\n", time.Since(start)) + if err != nil { + return + } + if tree == nil { err = JSONError{ Code: http.StatusNotFound, @@ -105,11 +110,6 @@ return } - log.Printf("loading octree took: %s\n", time.Since(start)) - if err != nil { - return - } - // The coordinate system of the octree is an UTM projection. // The input coordinates are in WGS84. // So we need to reproject them.