Skip to content

Commit 2f31bd5

Browse files
committed
refactor: replace exception throw with warning log in updateStateMany method
1 parent 0d3c5db commit 2f31bd5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/api/src/management/identities/identities-crud.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ export class IdentitiesCrudService extends AbstractIdentitiesService {
157157
}): Promise<ModifyResult<Query<T, T, any, T>>[]> {
158158
const identities = await this._model.find({ _id: { $in: body.ids } }).exec();
159159
if (identities.some((identity) => identity.state !== body.originState)) {
160-
throw new HttpException("Toutes les identités ne sont pas dans l'état attendu.", 400);
160+
// throw new HttpException("Toutes les identités ne sont pas dans l'état attendu.", 400);
161+
this.logger.warn("Toutes les identités ne sont pas dans l'état attendu." + JSON.stringify(identities.map(i => ({ id: i._id, state: i.state }))));
161162
}
162163

163164
if (identities.length === 0) {

0 commit comments

Comments
 (0)