Skip to content

Commit

Permalink
feat: add error handling for snapshot id
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed Dec 11, 2024
1 parent 75c436f commit 4dde3f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/driver/controller_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
// return nil, status.Error(codes.InvalidArgument, "Volume content source type is set to Snapshot, but the Snapshot is not provided")
// }
// snapshotID = snapshot.GetSnapshotId()
// if snapshotID == "" {
// return nil, status.Error(codes.InvalidArgument, "Volume content source type is set to Snapshot, but the SnapshotID is not provided")
// }
// }

log.Debug().Msg("Volume doesn't currently exist, will need creating")
Expand Down

0 comments on commit 4dde3f1

Please sign in to comment.