Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not set DEFAULT to simulation.type when making simulate-skill request #407

Merged
merged 1 commit into from
Aug 3, 2021

Conversation

RonWang
Copy link
Contributor

@RonWang RonWang commented Aug 3, 2021

This solves the issue #405

Before

$ ask dialog
Defaulting locale to the first value from the skill manifest: en-US
...

User  > open pizza reference
[Error]: {
  "message": "Invalid request payload. Please ensure that the request payload has no invalid fields"
}
User  >

AFter the fix:

 $ ask dialog
Defaulting locale to the first value from the skill manifest: en-US
...

User  > open pizza reference
Alexa > Welcome.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@RonWang RonWang self-assigned this Aug 3, 2021
@@ -125,7 +125,7 @@ class DialogCommand extends AbstractCommand {
Messenger.getInstance().info(`Defaulting locale to the first value from the skill manifest: ${firstLocaleFromManifest}`);
}
locale = locale || process.env.ASK_DEFAULT_DEVICE_LOCALE || firstLocaleFromManifest;
const simulationType = !stringUtils.isNonBlankString(cmd.simulationType) ? 'DEFAULT' : cmd.simulationType;
const simulationType = stringUtils.isNonBlankString(cmd.simulationType) ? cmd.simulationType : undefined;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is DEFAULT no longer the default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simulation.type in simulate-skill request should only be set when it's to simulate a NFI enabled skill. We should not set this field at all rather then letting developers set this field explicitly.

The meaning of the DEFAULT here is ambiguous, which we have requested the service side to correct it. We should set it as undefined if user doesn't set it explicitly in the --simulation-type option.

@RonWang RonWang merged commit 10a4ed9 into develop Aug 3, 2021
@RonWang RonWang deleted the ronwang_simulation_type_fix branch August 3, 2021 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants