Getting error because the compiler is expecting a tuple, but its receiving said tuple

I screenshot the error I’m getting. I called Array.find() on an array of tuples. the tuples are of type Principal and Journal as shown in the error message. When I attempt to return the tuple retrieved from the Array.find() call, i get this error message. I’ve already coded for error handling in cases where the Array.find() yields no results, but when I write the return statement for the scenario in which a tuple is returned, I’m getting this error message. What am I missing?

Replace

case (?v) {
  return userPrincipalAndJournal.1;
}

with

case (?v) {
  return v.1;
}
3 Likes

My hero. Thanks a ton!

1 Like