🐛 Fix Alexa import status error message retrieval #1606
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Currently Jovo assumes
ImportStatus.skill.resources
to never have a length > 1. Therefore, if the array is not empty, it tries to look theerror
property in the first element ofresources
. In reality however, theresources
can consist of >1 elements, where theerror
property might not be present in the first element. This leads to the folowing error:This is caused by this expression:
status.skill.resources[0].errors.length
.This is the
resources
property in my test, when I setprivacyPolicyUrl
toabc
to test this behaviour:Here you can see the
error
property being present onresources[1]
instead ofresources[0]
.Therefore I changed the type of
resources
to a normal array instead of a tuple with one element. Also it now looks up the element with an error present instead of assuming it to be the first element.With these changes you get the following output in the cli:
Types of Changes
Checklist