mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-21 23:43:27 +01:00
ux: Improve error message when endpoint is invalid
This commit is contained in:
parent
c84ae1cd55
commit
5c6bf84106
@ -2,6 +2,7 @@ package config
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
@ -267,7 +268,7 @@ func validateEndpointsConfig(config *Config) error {
|
||||
log.Printf("[config][validateEndpointsConfig] Validating endpoint '%s'", endpoint.Name)
|
||||
}
|
||||
if err := endpoint.ValidateAndSetDefaults(); err != nil {
|
||||
return err
|
||||
return fmt.Errorf("invalid endpoint %s: %s", endpoint.DisplayName(), err)
|
||||
}
|
||||
}
|
||||
log.Printf("[config][validateEndpointsConfig] Validated %d endpoints", len(config.Endpoints))
|
||||
|
Loading…
Reference in New Issue
Block a user