throw exception in case of unexpected response#37
throw exception in case of unexpected response#37eugeneg-aya wants to merge 4 commits intoappwrite:masterfrom
Conversation
WalkthroughThe Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (5)
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/ClamAV/ClamAV.php(1 hunks)
🔇 Additional comments (3)
src/ClamAV/ClamAV.php (3)
133-137: Good defensive validation for daemon response.The null/empty check correctly handles edge cases where the ClamAV daemon may not respond or return an invalid response.
139-146: Response parsing looks correct for the expected format.The validation ensures we have at least path and status components. Note: paths containing colons would cause issues, but this is a pre-existing limitation shared with
fileScanInStreamandcontinueScanmethods.
158-161: Good exception messaging with debugging context.Including both the parsed status and full response will help diagnose issues. Once the
FOUNDcheck (above) is fixed, this correctly handles genuinely unexpected responses likeERRORorUNKNOWN.
What does this PR do?
throw exception in case of unexpected response
#36
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.