Skip to content

feat(core): Improve error handling and attachment support - #786

Merged
haiphucnguyen merged 1 commit into
askimo-ai:mainfrom
huynguyen20011:bugfix/fix-generic-error-message-when-missing-attachment
Oct 30, 2026
Merged

haiphucnguyen merged 1 commit into
askimo-ai:mainfrom
huynguyen20011:bugfix/fix-generic-error-message-when-missing-attachment

Conversation

@huynguyen20011

Copy link
Copy Markdown
Contributor

Summary

  • The ErrorHandler file uses English words to describe the error, as well as its logic duplicate with ExceptionMapper. Simplify the askimo error handling.

Related Issue(s)

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • ♻️ Refactor (no functional change)
  • 🧪 Tests
  • 🔧 Chore / tooling / CI

What Changed & Why

How to Test

./gradlew test

Screenshots / Recordings (if applicable)

Checklist

  • I have read the CONTRIBUTING guide
  • My branch is up to date with main
  • I ran ./gradlew spotlessApply and ./gradlew detekt locally
  • I ran ./gradlew test and all tests pass
  • I added/updated tests for my changes (if applicable)
  • I added/updated documentation (if applicable)
  • My commits are signed off (DCO) — git commit -s
  • This PR is focused on a single feature/fix

Additional Notes

- Replace direct use of `ErrorHandler` with the centralized `ExceptionHandler`.
- Update `ExceptionHandler` to provide more context-aware and localized error messages, especially for attachments.
- Add dedicated `AttachmentException` to handle attachment failures gracefully.
- Consolidate error message logic across UI and core components.

BREAKING CHANGE: Error handling now relies on `ExceptionHandler` across the application. Services should update their calls to use the `ExceptionHandler.handle(...)` pattern instead of direct `ErrorHandler.getUserFriendlyError(...)`.
BREAKING CHANGE: Introduced a dedicated `error.attachment` message key for better localization and handling of file attachment failures.

@haiphucnguyen haiphucnguyen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @huynguyen20011 !

@haiphucnguyen
haiphucnguyen merged commit 2c20ef2 into askimo-ai:main Oct 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants