From 190432006dfe6233cf0a8bb66f08d5f117e7f336 Mon Sep 17 00:00:00 2001 From: Roman Perekhod Date: Wed, 7 Jun 2023 13:24:51 +0200 Subject: [PATCH] handle the bad request status --- internal/grpc/services/storageprovider/storageprovider.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/grpc/services/storageprovider/storageprovider.go b/internal/grpc/services/storageprovider/storageprovider.go index 9748db5cc62..e08aff6bdb8 100644 --- a/internal/grpc/services/storageprovider/storageprovider.go +++ b/internal/grpc/services/storageprovider/storageprovider.go @@ -499,6 +499,8 @@ func (s *service) CreateStorageSpace(ctx context.Context, req *provider.CreateSt } case errtypes.AlreadyExists: st = status.NewAlreadyExists(ctx, err, "already exists") + case errtypes.BadRequest: + st = status.NewInvalid(ctx, err.Error()) default: st = status.NewInternal(ctx, "error creating space") appctx.GetLogger(ctx).