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: prevent errors to be displayed as [Error]: [object Object] #478

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

doiron
Copy link
Contributor

@doiron doiron commented Jun 21, 2023

some reports of failures deploying were displaying error outputs on the terminal as

[Error]: [object Object]

this PR resolves this issue by updating the Messenger class directly to call jsonview.toString() which internally calls JSON.stringify on the object. Confirmed that it now prints the error but it's also unfortunately stringified. However now we can see the error messages and stack.

[Error]: "{\n  \"message\": \"TEST_MESSAGE\",\n  \"stack\": \"TEST_STACK\"}"

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

@doiron doiron marked this pull request as ready for review June 21, 2023 05:45
@doiron doiron merged commit 818ebe2 into develop Jun 22, 2023
@doiron doiron deleted the stringify-errors branch June 22, 2023 17:42
@UniSnake
Copy link

I'm still experiencing this or something like this in 2.30.3
I'm using a Windows PowerShell terminal.

PS C:\dev\STG> ask deploy --ignore-hash
Deploy configuration loaded from ask-resources.json
Deploy project for profile [default]

==================== Deploy Skill Metadata ====================
Uploading the entire skill package and building the models. Normally it takes a few minutes...
  √ Using pre-existing skill id: <snipped>
  √ Importing skill using import id: <snipped>
  √ [Interaction Model] build is complete.
[Warn]: [object Object]
Skill package deployed and all models built successfully.

Note the [Warn]: [object Object]

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.

4 participants