fix(contacts): fix loop and use only resolved contacts from scim #3829
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.
COMPLETES # NA
This pull request addresses
an error and crash while populating the contact details from the SCIM response. SCIM doesn't always return the same list of cloud contacts as present in the contactsDataMap. Due to this, a loop over the contactsDataMap will always cause a problem.
For example, you might have 5 cloud contacts in your list. Out of these 3 are in the same org as you, 2 are not.
In the SCIM response, even if you query for all 5, you'll receive only 3 in the response. The 2 remaining contacts are unresolvable and therefore, we cannot get any details about them.
by making the following changes
Fixed the loop to use the SCIM response list instead of contactsDataMap.
Change Type
The following scenarios where tested
I certified that
I have read and followed contributing guidelines
I discussed changes with code owners prior to submitting this pull request
I have not skipped any automated checks
All existing and new tests passed
I have updated the documentation accordingly
Make sure to have followed the contributing guidelines before submitting.