Skip to content

Commit

Permalink
Merge pull request #4385 from coralproject/fix/CORL-2927-translate-er…
Browse files Browse the repository at this point in the history
…rors-if-tenant-locale-available

[CORL-2927] Use tenant locale to translate Graphql errors if available
  • Loading branch information
kabeaty authored Dec 6, 2023
2 parents d7ae759 + ec8261c commit b7d2c84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/core/server/graph/plugins/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function hoistCoralErrorExtensions(
}

// Get the translation bundle.
const bundle = ctx.i18n.getBundle(ctx.lang);
const bundle = ctx.i18n.getBundle(ctx.tenant ? ctx.tenant.locale : ctx.lang);

// Translate the extensions.
const extensions = originalError.serializeExtensions(bundle, ctx.id);
Expand Down

0 comments on commit b7d2c84

Please sign in to comment.