Skip to content

Conversation

@yakov-sudo
Copy link

…ndling

Fixes #515

This PR wraps template retrieval logic in try/catch blocks so that:

  • If a translated template lookup fails via translated_templates.get(), the original template is kept
  • If get_email_template() fails for a specific language, it falls back to getting the template without language

This prevents the entire email sending operation from failing when a translation is unavailable.

…ndling

Fixes ui#515

This PR wraps template retrieval logic in try/catch blocks so that:
- If a translated template lookup fails via translated_templates.get(), the original template is kept
- If get_email_template() fails for a specific language, it falls back to getting the template without language

This prevents the entire email sending operation from failing when a translation is unavailable.
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.

Support fallback language in get_template with try/catch error handling

1 participant