fix(updater): error when server has not the minimal information

This commit is contained in:
Quentin McGaw
2022-08-25 13:23:27 +00:00
parent 5eacb46226
commit d1c5e00df8

View File

@@ -29,9 +29,9 @@ func (u *Updater) updateProvider(ctx context.Context, provider Provider,
for _, server := range servers {
err := server.HasMinimumInformation()
if err != nil {
serverJSON, err := json.Marshal(server)
if err != nil {
panic(err)
serverJSON, jsonErr := json.Marshal(server)
if jsonErr != nil {
panic(jsonErr)
}
return fmt.Errorf("server %s has not enough information: %w", serverJSON, err)
}