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
parent 7189a4c379
commit 7f98c2ea3f
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