diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1c568bb..a0b5de5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,8 @@ 8.0.4 (unreleased) ------------------ -- Nothing changed yet. +- Adding the reason of the error when migrating + [nilbacardit26] 8.0.3 (2024-04-10) diff --git a/guillotina_elasticsearch/migration.py b/guillotina_elasticsearch/migration.py index 7a61d12..29cabf3 100644 --- a/guillotina_elasticsearch/migration.py +++ b/guillotina_elasticsearch/migration.py @@ -457,7 +457,8 @@ async def _index_batch(self, batch): self.batch[_id] = batch[_id] self.batch[_id]["action"] = "index" else: - errors.append(f'{_id}: {value["status"]}') + reason = value.get("reason") + errors.append(f'{_id}: {value["status"]} {reason}') if len(errors) > 0: logger.warning(f"Error bulk putting: {errors}") diff --git a/setup.py b/setup.py index 312ad5e..897459d 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ "pytest-cov", "pytest-docker-fixtures[pg]>=1.3.0", "prometheus-client>=0.9.0", # TODO: remove - "docker>=6.0.0,<=6.1.3" + "docker>=7.1.0", ]