ing
This commit is contained in:
parent
06ea44929a
commit
0842585db2
|
@ -76,6 +76,10 @@ func (s *RESTServlets) HandleGet(servletCtx server.ServletCtx, ctx *fasthttp.Req
|
||||||
|
|
||||||
reply, err := s.RPCInvoker.Invoke(reqCodec, servletCtx, ctx)
|
reply, err := s.RPCInvoker.Invoke(reqCodec, servletCtx, ctx)
|
||||||
|
|
||||||
|
if nil == reply && nil == err {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
buf, err := reqCodec.NewResponseWithString(reply.(string), err)
|
buf, err := reqCodec.NewResponseWithString(reply.(string), err)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
return csw.NewError(fasthttp.StatusInternalServerError, err)
|
return csw.NewError(fasthttp.StatusInternalServerError, err)
|
||||||
|
@ -99,6 +103,10 @@ func (s *RESTServlets) HandlePost(servletCtx server.ServletCtx, ctx *fasthttp.Re
|
||||||
|
|
||||||
reply, err := s.RPCInvoker.Invoke(reqCodec, servletCtx, ctx)
|
reply, err := s.RPCInvoker.Invoke(reqCodec, servletCtx, ctx)
|
||||||
|
|
||||||
|
if nil == reply && nil == err {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
buf, err = reqCodec.NewResponseWithString(reply.(string), err)
|
buf, err = reqCodec.NewResponseWithString(reply.(string), err)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
return csw.NewError(fasthttp.StatusInternalServerError, err)
|
return csw.NewError(fasthttp.StatusInternalServerError, err)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user