Skip to content

Translate API Errors - #6702

Merged
jarednorman merged 5 commits into
solidusio:mainfrom
SuperGoodSoft:api-error-assertions-use-translations
Oct 19, 2026
Merged

jarednorman merged 5 commits into
solidusio:mainfrom
SuperGoodSoft:api-error-assertions-use-translations

Conversation

@jarednorman

Copy link
Copy Markdown
Member

Summary

@benjaminwil had a good idea here: the API responses weren't consistently translated and should be. The ones I was changing were translated in the partials, but not the helpers. This PR fixes that and makes our tests consistent in asserting against translated errors from the API.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@jarednorman
jarednorman requested a review from a team as a code owner October 17, 2026 04:52
@github-actions github-actions Bot added the changelog:solidus_api Changes to the solidus_api gem label Oct 17, 2026
@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.46%. Comparing base (4dd5312) to head (ecdf1ed).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6702   +/-   ##
=======================================
  Coverage   92.46%   92.46%           
=======================================
  Files        1058     1058           
  Lines       21493    21493           
=======================================
  Hits        19873    19873           
  Misses       1620     1620           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tvdeyen tvdeyen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great change. Thanks. I have a suggestion about using translations in specs. Not sure how we handled this in the past.

Comment thread api/spec/requests/spree/api/payments_spec.rb Outdated
@jarednorman
jarednorman force-pushed the api-error-assertions-use-translations branch from 88c26aa to ecdf1ed Compare October 17, 2026 20:09
@jarednorman
jarednorman merged commit bafb57f into solidusio:main Oct 19, 2026
43 checks passed
@jarednorman
jarednorman deleted the api-error-assertions-use-translations branch October 19, 2026 17:02
@jarednorman jarednorman mentioned this pull request Oct 19, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_api Changes to the solidus_api gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants