MSP-5013 change variable error
This commit is contained in:
1 parent
f63bf4a9f1
commit
ab95da7242
2 files changed
+1
-3
No files matched your search
@@ -139,7 +139,7 @@ func (c Variable) Upsert(ctx context.Context, req []domain.UpsertVariableRequest
|
||||
func (c Variable) Delete(ctx context.Context, req domain.VariableByNameRequest) error {
|
||||
err := c.service.Delete(ctx, req.Name)
|
||||
switch {
|
||||
case errors.Is(err, entity.ErrConfigNotFound):
|
||||
case errors.Is(err, entity.ErrVariableNotFound):
|
||||
return apierrors.NewBusinessError(domain.ErrorCodeVariableNotFound, "variable by name not found", err)
|
||||
case errors.Is(err, entity.ErrVariableUsedInConfigs):
|
||||
return apierrors.NewBusinessError(domain.ErrorCodeVariableUsedInConfigs, "variable used in configs", err)
|
||||
|
||||
Reference in new issue
Block a user