mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-07 23:02:12 +02:00
fix middleware errors (#717)
This commit is contained in:
parent
ef996c826a
commit
1fd1332c92
@ -144,7 +144,9 @@ func (s *Server) ServeHTTP(res http.ResponseWriter, req *http.Request) {
|
||||
if s.middleware != nil {
|
||||
h = s.middleware(h)
|
||||
}
|
||||
h(ctx, req.WithContext(ctx))
|
||||
if _, err := h(ctx, req.WithContext(ctx)); err != nil {
|
||||
s.errorEncoder(res, req, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Endpoint return a real address to registry endpoint.
|
||||
|
Loading…
Reference in New Issue
Block a user