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

    @strawberry.type
    class Query:
        ok: bool

    @strawberry.type
    class Mutation:
        @strawberry.mutation
        def uuid_input(self, uuid_input: uuid.UUID) -> uuid.UUID:
            return uuid_input

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

    result = schema.execute_sync(
        """
            mutation uuidInput($value: UUID!) {
                uuidInput(uuidInput: $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 "
        'UUID: "fail". badly formed hexadecimal UUID string'
    )
Test GraphQLError is raised for an invalid UUID.
    The error should exclude "original_error".
    
tests/schema/types/test_uuid.py