Error out server if CustomLinks invalid on run

Signed-off-by: Chris Goller <goller@gmail.com>
pull/10616/head
Jared Scheib 2017-06-27 13:31:35 -07:00 committed by Chris Goller
parent 91bae804e1
commit 33127d7915
1 changed files with 8 additions and 0 deletions

View File

@ -289,6 +289,14 @@ func (s *Server) Serve(ctx context.Context) error {
KapacitorUsername: s.KapacitorUsername,
KapacitorPassword: s.KapacitorPassword,
}
_, err := NewCustomLinks(s.CustomLinks)
if err != nil {
logger.
WithField("component", "server").
WithField("CustomLink", "invalid").
Error(err)
return err
}
service := openService(ctx, s.BoltPath, layoutBuilder, sourcesBuilder, kapacitorBuilder, logger, s.useAuth())
basepath = s.Basepath
if basepath != "" && s.PrefixRoutes == false {