cburgmer / greenyet

Microservices status dashboard
BSD 2-Clause "Simplified" License
11 stars 6 forks source link

Fail with a meaningful error on misconfiguration #13

Closed cburgmer closed 7 years ago

cburgmer commented 7 years ago

If hostname: is misspelled the server crashes on startup rather than stating what's wrong. Other keys will probably have the same issue.

cburgmer commented 7 years ago

Also, how about warning on unknown keys?

cburgmer commented 7 years ago

On the issue of unknown keys: generally we want to accept other stuff in the payload and not fail hard. Warning might be nice, but the amount of work to just have stuff dumped in the logs is probably not worth it.

Schema validation (JSON schema, Clojure schema or something similar) would be nice, but a few minutes investigation didn't turn up anything with human readable error messages. JSON schema probably works well, but alternative values (for color property) is not implemented in closchema.