bee icon indicating copy to clipboard operation
bee copied to clipboard

Bytes endpoint 404 prints Swarmageddon in the logs for a `/bytes/<address>`

Open Cafe137 opened this issue 1 year ago • 1 comments

Context

Bee 2.3.1

Summary

Make an obvious 404 bytes request:

GET http://localhost:1633/bytes/00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff

Bee logs:

"time"="2024-12-17 21:41:06.261675" "level"="error" "logger"="node/api/get_bytes_by_address" "msg"="swarmageddon has begun
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found
storage: not found"

Expected behavior

  • [ ] storage: not found is not printed over and over
  • [ ] I thought we only printed the "Swarmageddon" text for cases when data MUST exist but is not retrievable. Bee should not throw a tantrum for all bytes 404s.

Actual behavior

Please see summary

Steps to reproduce

Please see summary, it is reproducible with any wrong address.

Possible solution

BZZ endpoint handles it without being overly dramatic:

"time"="2024-12-17 21:18:11.283647" "level"="error" "logger"="node/api/get_bzz_by_path" "msg"="address not found or incorrect"

Cafe137 avatar Dec 17 '24 20:12 Cafe137

Can you try reproduce it with the latest Bee? I can not reproduce it.

martinconic avatar Apr 04 '25 09:04 martinconic