def test_serialization_of_incorrect_decimal_string():
    """Test GraphQLError is raised for an invalid Decimal.
    The error should exclude "original_error".
    """

    @strawberry.type
    class Query:
        ok: bool

    @strawberry.type
    class Mutation:
        @strawberry.mutation
        def decimal_input(self, decimal_input: Decimal) -> Decimal:
            return decimal_input

    schema = strawberry.Schema(query=Query, mutation=Mutation)

    result = schema.execute_sync(
        """
            mutation decimalInput($value: Decimal!) {
                decimalInput(decimalInput: $value)
            }
        """,
        variable_values={"value": "fail"},
    )

    assert result.errors
    assert isinstance(result.errors[0], GraphQLError)
    assert result.errors[0].message == (
        "Variable '$value' got invalid value 'fail'; Value cannot represent a "
        'Decimal: "fail".'
    )
Test GraphQLError is raised for an invalid Decimal.
    The error should exclude "original_error".
    
tests/schema/types/test_decimal.py