Skip to content

Commit

Permalink
don't report ErrResponseIsNotFinal as error
Browse files Browse the repository at this point in the history
  • Loading branch information
pirtleshell committed Feb 2, 2024
1 parent d6955c1 commit 581c6c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/cachemdw/caching_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ func (c *ServiceCache) CachingMiddleware(
// In this context ErrResponseIsNotCacheable isn't an actual error, it means that we can't cache the response
// because it may change in the future.
// For ex. it can be empty/null response for future blocks.
); err != nil && err != ErrResponseIsNotCacheable {
c.Logger.Error().Msgf("can't validate and cache response: %v", err)
// Similarly, non-finalized responses are also not actual errors
); err != nil && err != ErrResponseIsNotCacheable && err != ErrResponseIsNotFinal {
c.Logger.Debug().Msgf("can't validate and cache response: %v", err)
}
}

Expand Down

0 comments on commit 581c6c4

Please sign in to comment.