Conversation
📝 WalkthroughWalkthroughTwo minor changes to the backend HTTP client and database configuration: explicit User-Agent header added to outbound HTTP requests, and query parameter parsing logic simplified via pattern guard refactoring. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@backend/crates/atlas-server/src/indexer/metadata.rs`:
- Around line 47-51: Add a unit test in a #[cfg(test)] mod tests block in the
same metadata.rs file that asserts the new User-Agent behavior: instantiate or
exercise the code path that creates the reqwest::Client (the client variable
built with .user_agent("atlas-server/0.1.0")) and verify that outgoing requests
include the "User-Agent: atlas-server/0.1.0" header (or that the client's
default headers contain that value); name the test clearly (e.g.,
test_user_agent_header) and keep it runnable with cargo test --workspace to
prevent regressions of the request-header logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: acad398a-9c9e-4fb4-baa1-195c17fbe7b5
📒 Files selected for processing (2)
backend/crates/atlas-server/src/indexer/metadata.rsbackend/crates/atlas-server/src/main.rs
Summary
Adds
.user_agent("atlas-server/0.1.0")to thereqwestclient inMetadataFetcher::new. CDNs serving NFT metadata (IPFS gateways, OpenSea, etc.) classify requests with no User-Agent as bots and return 403, causingimage_urlto stay null and images to be blank.Summary by CodeRabbit
Release Notes