-
Notifications
You must be signed in to change notification settings - Fork 5
Improve user-friendly error output for Fluent #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves error handling for Fluent translation errors by introducing a new FluentMessageError exception that aggregates multiple errors and formats them in a user-friendly way. Instead of only raising the first error encountered during Fluent message formatting, all errors are now collected and presented together with their types.
- Introduces
FluentMessageErrorexception for better error reporting - Updates both Fluent runtime and compile cores to use the new exception
- Fixes duplicate function names in example code
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/aiogram_i18n/exceptions.py | Adds new FluentMessageError exception class with formatted multi-error output |
| src/aiogram_i18n/cores/fluent_runtime_core.py | Updates error handling to raise FluentMessageError instead of first error only |
| src/aiogram_i18n/cores/fluent_compile_core.py | Updates error handling to raise FluentMessageError instead of first error only |
| examples/language_inline_markup.py | Renames duplicate function names from btn_help to btn_back and btn_lang |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
FTL file:
Before:
After: