mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
treewide: DeleteFailReason as an object with translated details
This commit is contained in:
@@ -778,7 +778,7 @@ func getModelExtraDetails(item IModel, ctx context.Context, showReason bool) api
|
||||
if err != nil {
|
||||
out.CanDelete = false
|
||||
if showReason {
|
||||
out.DeleteFailReason = err.Error()
|
||||
out.DeleteFailReason = httperrors.NewErrorFromGeneralError(ctx, err)
|
||||
}
|
||||
}
|
||||
err = item.ValidateUpdateCondition(ctx)
|
||||
|
||||
Reference in New Issue
Block a user