rbd: return GRPC error message

The error message return from the GRPC
should be of GRPC error messages only
not the normal go errors. This commits
returns GRPC error if setAllMetadata
fails.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2022-10-14 14:47:52 +02:00 committed by mergify[bot]
parent 01d4a614c3
commit 69eb6e40dc

View File

@ -388,7 +388,7 @@ func (cs *ControllerServer) CreateVolume(
log.ErrorLog(ctx, "failed to delete rbd image: %s with error: %v", rbdVol, deleteErr)
}
return nil, err
return nil, status.Error(codes.Internal, err.Error())
}
return buildCreateVolumeResponse(req, rbdVol), nil