Skip to content

[GraphQl] Exception are not translated to store scope. #31351

@Hexmage

Description

@Hexmage

Preconditions (*)

Reproduced on

  1. Magento 2.3.5-p2
  2. Magento 2.4.1

Steps to reproduce (*)

  1. Set the locale of a store to anything but en_US.
  2. Create a translation file/database entry with one of the translatable exception strings (eg: 'currentPage value must be greater than 0.' to 'This text is translated')
  3. Make a GraphQl request that will cause the exception to trigger with the Store header for the store set in 1.
query productList{
    products( currentPage: 0) {
        items {
            id
            name
        }
    }
}

Expected result (*)

{
    "errors": [
        {
            "message": "This text is translated.",
            "extensions": {
                "category": "graphql-input"
            },
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": [
                "products"
            ]
        }
    ],
    "data": {
        "products": null
    }
}

Actual result (*)

{
    "errors": [
        {
            "message": "currentPage value must be greater than 0.",
            "extensions": {
                "category": "graphql-input"
            },
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": [
                "products"
            ]
        }
    ],
    "data": {
        "products": null
    }
}

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Cart & CheckoutComponent: GraphQLGraphQLIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneProject: GraphQLReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions