The ending index cannot be less than 1 or more than the length of the item.
Use a valid index for the ending index of the substring operator.