Summary
Found 46 unwrap occurrences across 20 files that need to be addressed for better error handling.
Files and Occurrence Count
• src/push/queues.rs (14 calls)
• src/extractor.rs (5 calls)
• tests/push.rs (4 calls)
• tests/connection_actor.rs (3 calls)
• src/server/config/binding.rs (3 calls)
• tests/world.rs (2 calls)
• tests/wireframe_protocol.rs (2 calls)
• tests/stream_end.rs (2 calls)
• tests/session_registry.rs (1 call)
• tests/server.rs (1 call)
• tests/push_policies.rs (1 call)
• tests/correlation_id.rs (1 call)
• tests/async_stream.rs (1 call)
• tests/advanced/interaction_fuzz.rs (1 call)
• tests/advanced/concurrency_loom.rs (1 call)
• src/server/connection.rs (1 call)
• src/frame/tests.rs (1 call)
• src/app.rs (1 call)
Requirements
Production Code (src/)
Replace unwrap uses with proper error propagation:
- Use
? operator where appropriate
- Use
map_err for error transformation
- Use
expect with descriptive messages where unwrap is unavoidable
Test Code (tests/)
Replace raw unwrap() calls with expect("descriptive failure message") to provide better debugging information when tests fail.
Task
Review each file and refactor accordingly to improve error handling and debugging experience.
References
Summary
Found 46 unwrap occurrences across 20 files that need to be addressed for better error handling.
Files and Occurrence Count
• src/push/queues.rs (14 calls)
• src/extractor.rs (5 calls)
• tests/push.rs (4 calls)
• tests/connection_actor.rs (3 calls)
• src/server/config/binding.rs (3 calls)
• tests/world.rs (2 calls)
• tests/wireframe_protocol.rs (2 calls)
• tests/stream_end.rs (2 calls)
• tests/session_registry.rs (1 call)
• tests/server.rs (1 call)
• tests/push_policies.rs (1 call)
• tests/correlation_id.rs (1 call)
• tests/async_stream.rs (1 call)
• tests/advanced/interaction_fuzz.rs (1 call)
• tests/advanced/concurrency_loom.rs (1 call)
• src/server/connection.rs (1 call)
• src/frame/tests.rs (1 call)
• src/app.rs (1 call)
Requirements
Production Code (src/)
Replace unwrap uses with proper error propagation:
?operator where appropriatemap_errfor error transformationexpectwith descriptive messages where unwrap is unavoidableTest Code (tests/)
Replace raw
unwrap()calls withexpect("descriptive failure message")to provide better debugging information when tests fail.Task
Review each file and refactor accordingly to improve error handling and debugging experience.
References