Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Code?: number, // 15052
Error?: string, // Message does not exist
ErrorDescription?: string,
Details?: object;
}>(error)
&&
error.status === 422
&&
error.data.Code === 15052
) { // ignoring the error as expected to happen
logger.warn(
// WARN don't log message-specific data as it might include sensitive fields
`Skip message fetching as it has been already removed from the trash before fetch action started`,
// WARN don't log full error as it might include sensitive data
JSON.stringify(
pick(error, ["data", "status", "statusText"]),
),
);
} else {
throw error;
}
}
}
await (async () => {
const labels = await api.label.query();
const upsertIds = mapping.folders.upsertIds.map(({id}) => id);
const folders = labels
.filter(({ID}) => upsertIds.includes(ID))
.map(Database.buildFolder);
patch.folders.upsert.push(...folders);
})();
for (const {id} of mapping.contacts.upsertIds) {
(global, router) => ({
...R.pick(global, ['isLoaded', 'user']),
...R.pick(router, ['location']),
})
);
(global, router) => ({
...R.pick(global, ['isLoaded', 'user']),
...R.pick(router, ['location']),
})
);