This commit is contained in:
Adam Majer 2024-07-09 23:52:28 +02:00
parent 814b558a1c
commit d155921ab3

View File

@ -62,6 +62,12 @@ func StartServerWithAddress(listenDefs ListenDefinitions, addr string) {
return
}
if h.HasError() {
h.LogError("error in parser %s: %v", reqType, h.Error)
res.WriteHeader(http.StatusInternalServerError)
return
}
if err := handler(h); err != nil {
h.LogError("error in handler for %s: %v", reqType, err)
res.WriteHeader(http.StatusInternalServerError)