mirror of
https://github.com/juanfont/headscale.git
synced 2026-03-24 10:21:33 +01:00
Get rid of dynamic errors
This commit is contained in:
@@ -81,6 +81,7 @@ func LoadConfig(path string) error {
|
||||
errorText += "Fatal config error: server_url must start with https:// or http://\n"
|
||||
}
|
||||
if errorText != "" {
|
||||
//nolint
|
||||
return errors.New(strings.TrimSuffix(errorText, "\n"))
|
||||
} else {
|
||||
return nil
|
||||
@@ -305,6 +306,8 @@ func getHeadscaleApp() (*headscale.Headscale, error) {
|
||||
// to avoid races
|
||||
minInactivityTimeout, _ := time.ParseDuration("65s")
|
||||
if viper.GetDuration("ephemeral_node_inactivity_timeout") <= minInactivityTimeout {
|
||||
// TODO: Find a better way to return this text
|
||||
//nolint
|
||||
err := fmt.Errorf(
|
||||
"ephemeral_node_inactivity_timeout (%s) is set too low, must be more than %s",
|
||||
viper.GetString("ephemeral_node_inactivity_timeout"),
|
||||
|
||||
Reference in New Issue
Block a user