# HG changeset patch # User Sascha L. Teichmann # Date 1538123109 -7200 # Node ID 03e966b71a887d0b3fe3d77c7a2d6f052634c26b # Parent 1761694dad4a488790ad5a30acee2106a99efea5 cross profile controller: Handle real errors before checking if there is no matching survey. diff -r 1761694dad4a -r 03e966b71a88 pkg/controllers/cross.go --- 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.