Skip to content

Include machinery backend error details in logs#20366

Open
hemaa0325 wants to merge 1 commit into
WeblateOrg:mainfrom
hemaa0325:fix-suggestion-backend-errors
Open

Include machinery backend error details in logs#20366
hemaa0325 wants to merge 1 commit into
WeblateOrg:mainfrom
hemaa0325:fix-suggestion-backend-errors

Conversation

@hemaa0325

@hemaa0325 hemaa0325 commented Jun 29, 2026

Copy link
Copy Markdown

Summary

This change improves error reporting for machine translation backend failures.

Previously, when translation fetching failed, Weblate only reported a generic error message:

Could not fetch translations

This update extracts the actual backend error message and includes it in report_error() using extra_log.

Changes made

  • Extract backend error message using get_error_message(exc)
  • Pass detailed error message into report_error() through extra_log
  • Reuse the extracted message when raising MachineTranslationError

Benefit

This helps administrators understand backend failures such as rate limits, invalid credentials, and temporary service outages.

@hemaa0325 hemaa0325 requested a review from nijel as a code owner June 29, 2026 17:06
@nijel

nijel commented Jun 30, 2026

Copy link
Copy Markdown
Member

The test assertion will have to be adjusted to match changed behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants