Skip to content

Commit

Permalink
chore: added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mihir-4116 committed Sep 22, 2023
1 parent 195f3e3 commit e5f0f75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/v0/destinations/iterable/deleteUsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const userDeletionHandler = async (userAttributes, config) => {
const handledDelResponse = processAxiosResponse(resp);
if (!isHttpStatusSuccess(handledDelResponse.status) && handledDelResponse.status !== 404) {
if (handledDelResponse.status !== 400) {
// Generic errors such as invalid api key
throw new NetworkError(
`User deletion request failed : ${handledDelResponse.response.msg}`,
handledDelResponse.status,
Expand All @@ -49,6 +50,7 @@ const userDeletionHandler = async (userAttributes, config) => {
handledDelResponse,
);
} else {
// Specific errors such as user is not found
failedUserDeletions.push({ userId: uId, Reason: handledDelResponse.response.msg });
}
}
Expand Down

0 comments on commit e5f0f75

Please sign in to comment.