Skip to content

Commit bef017e

Browse files
committed
remove panic
1 parent b7bfaa0 commit bef017e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/driver/controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ func (cs *controllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateS
340340

341341
t, err := time.Parse("2006-01-02T15:04:05-0700", snapshot.CreatedAt)
342342
if err != nil {
343-
panic(err)
343+
return nil, status.Errorf(codes.Internal, "Failed to parse snapshot creation time: %v", err)
344344
}
345345

346346
// Convert to Timestamp protobuf

0 commit comments

Comments
 (0)