explicit message for 404

This commit is contained in:
marco 2024-03-11 16:13:30 +01:00
parent b00e553ce9
commit 95f38d97d8

View file

@ -164,6 +164,9 @@ func (m *MetricsProvider) Run(ctx context.Context, myTomb *tomb.Tomb) error {
case errors.Is(err, context.DeadlineExceeded):
m.logger.Warnf("timeout sending lp metrics")
continue
case err != nil && resp != nil && resp.Response.StatusCode == http.StatusNotFound:
m.logger.Warnf("metrics endpoint not found, older LAPI?")
continue
case err != nil:
m.logger.Warnf("failed to send lp metrics: %s", err)
continue