mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-05-28 17:46:41 +00:00
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> (cherry picked from commit 69eb6e40dc2ab12cac2cf120f938a7f0e5016ce3)
This commit is contained in:
parent
42bed5a346
commit
a3a0730900
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user