mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Bailout unknown config (#216)
* provider now checks for undecoded config entries and returns an error if any are found * Specific error message now in server logs, more general message for user * Changes spaces to tabs for formatting consistency * Further formatting * Improved handling of undecoded TOML fields in config. * aggregator now checks for not decoded config options Co-authored-by: Jan Höfelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de> Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
This commit is contained in:
parent
cbb9c7a7a1
commit
46f79a9e24
3 changed files with 15 additions and 3 deletions
|
|
@ -47,7 +47,8 @@ func main() {
|
|||
cfg, err := loadConfig()
|
||||
if err != nil {
|
||||
cgi.Serve(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
|
||||
http.Error(rw, fmt.Sprintf("Config error: %v\n", err), http.StatusInternalServerError)
|
||||
http.Error(rw, "Something went wrong. Check server logs for more details",
|
||||
http.StatusInternalServerError)
|
||||
}))
|
||||
log.Fatalf("error: %v\n", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue