only set the code to 200 if no error exists
This commit is contained in:
parent
a9a429824c
commit
27aa71e0ee
@ -42,16 +42,14 @@ func (ash *ATSessionHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
rqs, err = ash.Process(rqs)
|
rqs, err = ash.Process(rqs)
|
||||||
switch err {
|
switch err {
|
||||||
case handlers.ErrStorage:
|
case nil: // set code to 200 if no err
|
||||||
code = 500
|
code = 200
|
||||||
case handlers.ErrEngineInit:
|
case handlers.ErrStorage, handlers.ErrEngineInit, handlers.ErrEngineExec, handlers.ErrEngineType:
|
||||||
code = 500
|
|
||||||
case handlers.ErrEngineExec:
|
|
||||||
code = 500
|
code = 500
|
||||||
default:
|
default:
|
||||||
code = 200
|
code = 500
|
||||||
}
|
}
|
||||||
|
|
||||||
if code != 200 {
|
if code != 200 {
|
||||||
|
Loading…
Reference in New Issue
Block a user