Skip to content

[Workers Analytics Engine] Type AnalyticsEngine is not wrapped correctly. #154

Description

@VergeDX

Demo:

from workers import WorkerEntrypoint, Response


class Default(WorkerEntrypoint):
    async def fetch(self, request):
        try:
            self.env.ANALYTICS.writeDataPoint(
                {
                    "blobs": ["blob1", "blob2"],
                    "doubles": [1.0, 2.5],
                    "indexes": ["idx"],
                }
            )

        except Exception as inst:
            return Response(str(inst))

        return Response("Hello world!")

After wrangler deploy, curl says:

TypeError: Incorrect type for the 'indexes' field on 'AnalyticsEngineEvent': the provided value is not of type 'Array'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions