Skip to content

Commit

Permalink
handle the bad request status
Browse files Browse the repository at this point in the history
  • Loading branch information
2403905 committed Jun 7, 2023
1 parent 4c2751c commit 1904320
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/grpc/services/storageprovider/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 1904320

Please sign in to comment.