From 7c51f211e1c719c344a3598cbf1a5462402bdaf8 Mon Sep 17 00:00:00 2001 From: Qiu Jian Date: Fri, 22 Feb 2019 10:18:10 +0800 Subject: [PATCH] fix: validate delete condition returns nested httperrors --- pkg/cloudcommon/db/db_dispatcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cloudcommon/db/db_dispatcher.go b/pkg/cloudcommon/db/db_dispatcher.go index 5256b6cafd..78f20c69ef 100644 --- a/pkg/cloudcommon/db/db_dispatcher.go +++ b/pkg/cloudcommon/db/db_dispatcher.go @@ -1326,7 +1326,7 @@ func deleteItem(manager IModelManager, model IModel, ctx context.Context, userCr err := model.ValidateDeleteCondition(ctx) if err != nil { log.Errorf("validate delete condition error: %s", err) - return nil, httperrors.NewNotAcceptableError(err.Error()) + return nil, err } err = model.CustomizeDelete(ctx, userCred, query, data)