awslabs / awslabs/aws-lambda-dart-runtime

AwsAlexaEvent parsing problem

Open
#21 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
152
Forks
31
PR merge metrics
No merged PRs in 30d

Description

Check this for the parsing of the AwsAlexaEvent

![image](https://user-images.githubusercontent.com/1146982/101187457-2b24dc00-3633-11eb-8234-7ca17f2dbf49.png)

It is expecting and **header** and a **payload** object.

The problem is, when we are testing the lambdas on aws, this is the json provided by the lambda testing tool:

```
{
"version": "1.0",
"session": {
"new": true,
"sessionId": "amzn1.echo-api.session.123456789012",
"application": {
"applicationId": "amzn1.ask.skill.987654321"
},
"user": {
"userId": "amzn1.ask.account.testUser"
},
"attributes": {}
},
"context": {
"AudioPlayer": {
"playerActivity": "IDLE"
},
"System": {
"application": {
"applicationId": "amzn1.ask.skill.987654321"
},
"user": {
"userId": "amzn1.ask.account.testUser"
},
"device": {
"supportedInterfaces": {
"AudioPlayer": {}
}
}
}
},
"request": {
"type": "LaunchRequest",
"requestId": "amzn1.echo-api.request.1234",
"timestamp": "2016-10-27T18:21:44Z",
"locale": "en-US"
}
}
```

As you can see there is no `header` or `payload` objects on this JSON, with ends by returning an empty AwsAlexaEvent.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.