Null coalesce folder responses #3
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.
PR details
When you
retrievefor a something that depends ondataExtension,mcdevwill automatically try to reach out toretrievethe Parent BU'sShared dataExtensions. However, if the credentials used lack the permissions to query the Parent BU the response will be empty. There's currently an assumption that the response will not be empty and so when we try to access the property it'sundefined; and we try to usemapon thatundefinedproperty and the retrieval fails.We don't think being unable to retrievve
shared dataExtensionsshould break the retrieval flow, so we're suggesting to simply null-coalesce to an empty array so there's something for the rest of the code to operate on.What changes did you make? (Give an overview)
response.Resultsso it is notundefined, so subsequent accessing of the variable won't throw.Further details (optional)
...
Checklist