refactor: Delete the dataset to verify whether it is in use (#5112)

This commit is contained in:
Summer-Gu 2024-06-14 03:25:38 +08:00 committed by GitHub
commit 7f98c2ea3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 36 additions and 12 deletions

View file

@ -71,3 +71,9 @@ class InvalidMetadataError(BaseHTTPException):
error_code = 'invalid_metadata'
description = "The metadata content is incorrect. Please check and verify."
code = 400
class DatasetInUseError(BaseHTTPException):
error_code = 'dataset_in_use'
description = "The dataset is being used by some apps. Please remove the dataset from the apps before deleting it."
code = 409