The database and the Elasticsearch indices can be corrupted if an operation on users fails. The operation should be resilient to errors and do not persist inconsistent data.
- POST api/users/create
- user is created in database
- user is added to default group --> failure, for instance because the default group does not exist (bad configuration).
- rollback, but it's too late, user has already been persisted and committed. User can't be created again and can't log in (no permissions)