Skip to content

Commit

Permalink
rbd: use internal as default error code in getGRPCError()
Browse files Browse the repository at this point in the history
This commit replaces codes.Unknown with codes.Internal
as the default error code in getGRPCError().

Signed-off-by: Rakshith R <rar@redhat.com>
  • Loading branch information
Rakshith-R committed Jun 10, 2024
1 parent b715bbe commit bdbf1a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/csi-addons/rbd/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,8 @@ func getGRPCError(err error) error {
}
}

// Handle any other non nil error not listed in the map
return status.Error(codes.Unknown, err.Error())
// Handle any other non nil error not listed in the map as internal error
return status.Error(codes.Internal, err.Error())
}

// GetVolumeReplicationInfo extracts the RBD volume information from the volumeID, If the
Expand Down

0 comments on commit bdbf1a9

Please sign in to comment.