chore: Refactor command exceptions (#24117)

This commit is contained in:
John Bodley
2023-05-19 09:08:12 -07:00
committed by GitHub
parent 0496779434
commit 8b4222ff9e
22 changed files with 44 additions and 76 deletions

View File

@@ -128,6 +128,4 @@ class DuplicateDatasetCommand(CreateMixin, BaseCommand):
exceptions.append(ex)
if exceptions:
exception = DatasetInvalidError()
exception.add_list(exceptions)
raise exception
raise DatasetInvalidError(exceptions=exceptions)