ADFA-2597 | Filter expected cache read errors from Sentry#856
Conversation
|
Caution Review failedThe pull request is closed. 📝 Walkthrough
WalkthroughAdded a nullable Throwable extension to detect file-not-found errors and updated ProjectHandlerActivity.onProjectInitialized to skip reporting expected file-not-found failures (FileNotFoundException, NoSuchFileException, or ErrnoException with ENOENT) to Sentry while still handling other errors. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
app/src/main/java/com/itsaky/androidide/activities/editor/ProjectHandlerActivity.kt
Outdated
Show resolved
Hide resolved
afb007c to
bfdc7c4
Compare
a3da47f to
202040d
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@app/src/main/java/com/itsaky/androidide/activities/editor/ProjectHandlerActivity.kt`:
- Around line 22-23: Add the missing import for
java.nio.file.NoSuchFileException so the isFileNotFound property can reference
NoSuchFileException without a compile error; specifically, add an import for
NoSuchFileException to the top of the file alongside ErrnoException and
OsConstants so usages in ProjectHandlerActivity.isFileNotFound resolve.
app/src/main/java/com/itsaky/androidide/activities/editor/ProjectHandlerActivity.kt
Show resolved
Hide resolved
4ac9868 to
37c4813
Compare
…ent FileNotFoundException and ENOENT during project initialization from reporting to Sentry
Added `isFileNotFound` extension to handle legacy IO, NIO, and Errno exceptions.
76f5a8a to
14c7338
Compare
Description
This PR filters out expected
FileNotFoundExceptionandErrnoException(ENOENT) errors from Sentry reporting during project initialization. These errors often occur due to race conditions or when users manually delete cache files, creating unnecessary noise in the issue tracker.Details
Logs are still printed to the local console for debugging, and the UI still notifies the user of the cache read failure, but the exception is no longer sent to Sentry if the cause is a missing file.
Screen.Recording.2026-01-19.at.3.56.01.PM.mov
Ticket
ADFA-2597
Observation
This change is purely internal to the error reporting logic; there are no visual changes for the user.