mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-04 13:36:35 +02:00
cmd/cli: log the config error that rejected a custom config
The warning reported err, the resolver-config fetch error, which is nil on every path that reaches it - so a rejected custom config was logged with no reason attached. cfgErr holds the validation failure.
This commit is contained in:
+4
-1
@@ -903,7 +903,10 @@ func processCDFlags(ctx context.Context, cfg *ctrld.Config) (*controld.ResolverC
|
||||
return resolverConfig, nil
|
||||
}
|
||||
}
|
||||
mainLog.Load().Warn().Err(err).Msg("Disregarding invalid custom config")
|
||||
// cfgErr, not err: err is the resolver-config fetch error from above, which is
|
||||
// nil on every path that reaches here, so logging it said nothing about why the
|
||||
// custom config was rejected.
|
||||
mainLog.Load().Warn().Err(cfgErr).Msg("Disregarding invalid custom config")
|
||||
}
|
||||
|
||||
bootstrapIP := func(endpoint string) string {
|
||||
|
||||
Reference in New Issue
Block a user