update for latest micro

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-03-25 21:12:26 +03:00
parent 76a0bdd67c
commit 7ea55fb466
5 changed files with 12 additions and 10 deletions

View File

@@ -134,14 +134,14 @@ func (h *httpStream) parseRsp(ctx context.Context, log logger.Logger, hrsp *http
buf, err = io.ReadAll(hrsp.Body)
if err != nil {
if log.V(logger.ErrorLevel) {
log.Errorf(ctx, "failed to read body: %v", err)
log.Error(ctx, "failed to read body", err)
}
return errors.InternalServerError("go.micro.client", string(buf))
}
}
if log.V(logger.DebugLevel) {
log.Debugf(ctx, "response %s with %v", buf, hrsp.Header)
log.Debug(ctx, fmt.Sprintf("response %s with %v", buf, hrsp.Header))
}
if hrsp.StatusCode < 400 {