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: display message property for all error instance types #491

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

jsetton
Copy link
Contributor

@jsetton jsetton commented Aug 9, 2023

Issue #, if available:

Description of changes:
Related to #488, I should have included this change as well.

Non-standard Error objects, such as CliWarn and CliError, are being display as stringified object instead of their message property.

[Warn]: {
  "message": "Skill api domain \"smartHome\" cannot be enabled. Skipping the enable process.\n",
  "stack": "CliWarn: Skill api domain \"smartHome\" cannot be enabled. Skipping the enable process.\n\n    at SkillMetadataController.validateDomain (/opt/hostedtoolcache/node/18.17.0/x64/lib/node_modules/ask-cli/dist/lib/controllers/skill-metadata-controller/index.js:106:19)\n    at Object.enableSkill (/opt/hostedtoolcache/node/18.17.0/x64/lib/node_modules/ask-cli/dist/lib/commands/deploy/helper.js:[101](https://github.com/openhab/openhab-alexa/actions/runs/5800707395/job/15759328693#step:6:102):29)\n    at /opt/hostedtoolcache/node/18.17.0/x64/lib/node_modules/ask-cli/dist/lib/commands/deploy/index.js:93:38\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
  "detail": {
    "name": "CliWarn"
  }
}

Likewise, SMAPI import status warnings seem to only include a message property. It makes sense to only display that property in that case.

[Warn]: {
  "message": "No interaction model definitions found in the import package for following locales declared in 'publishingInformation' of skill manifest: [\"ar-SA\",\"de-DE\",\"en-US\",\"en-CA\",\"pt-BR\",\"en-IN\",\"es-ES\",\"es-MX\",\"fr-CA\",\"it-IT\",\"hi-IN\",\"en-AU\",\"es-US\",\"fr-FR\",\"en-GB\",\"ja-JP\"]. These locales will not have voice interfaces after successful import."
}

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

Copy link
Contributor

@doiron doiron left a comment

Choose a reason for hiding this comment

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

nice improvement! thanks for the PR!

@doiron doiron merged commit d9a0cc6 into alexa:develop Nov 28, 2023
13 checks passed
@jsetton jsetton deleted the error-instance-msg-fix branch November 28, 2023 18:31
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