improved fx/ingestor logging

This commit is contained in:
Stephan D
2025-12-12 01:07:03 +01:00
parent 2ca1a6956c
commit fd47867101
3 changed files with 28 additions and 12 deletions

View File

@@ -168,13 +168,13 @@ func (c *cbrConnector) refreshDirectory() error {
resp, err := c.client.Do(req)
if err != nil {
c.logger.Warn("CBR directory request failed", zap.Error(err))
c.logger.Warn("CBR directory request failed", zap.Error(err), zap.String("endpoint", endpoint))
return merrors.InternalWrap(err, "cbr: directory request failed")
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
c.logger.Warn("CBR directory returned non-OK status", zap.Int("status", resp.StatusCode))
c.logger.Warn("CBR directory returned non-OK status", zap.Int("status", resp.StatusCode), zap.String("endpoint", endpoint))
return merrors.Internal("cbr: unexpected status " + strconv.Itoa(resp.StatusCode))
}
@@ -183,7 +183,7 @@ func (c *cbrConnector) refreshDirectory() error {
var directory valuteDirectory
if err := decoder.Decode(&directory); err != nil {
c.logger.Warn("CBR directory decode failed", zap.Error(err))
c.logger.Warn("CBR directory decode failed", zap.Error(err), zap.String("endpoint", endpoint))
return merrors.InternalWrap(err, "cbr: decode directory")
}