Returns index of the desired error in the list.
Returns index of the desired item in the list.
If there are more than one items that satisfy the criteria, the index of the first one is returned.
If there no matches were found, -1 is returned.
Use this method to get the index of the desired error in the list using error object itself or error code.