Skip to content

Discovery items type error failure #253

@jsetton

Description

@jsetton

Per the skill logs, several users discovery requests are failing due to the error below

error: discover failed with error:items.forEach is not a function
{
    "stack": "TypeError: items.forEach is not a function\n    at Promise.all.then (/var/task/alexa/v3/discovery.js:45:13)\n    at <anonymous>\n    at process._tickDomainCallback (internal/process/next_tick.js:228:7)"
}

After enabling debug mode, the issue seems to be related to the items data value being a string because the request call seems to only have read/received a partial response preventing the expected JSON object from being parsed properly.

The example based on the reference below isn't that considerably big in size, although it's just partial data, and the Lambda execution time for that request was about 5 seconds.

Lambda request log reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions