.
This commit is contained in:
parent
814b558a1c
commit
d155921ab3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user