I am trying to fetch list of users belongs to a particular team. if user belongs to team then this code works properly otherwise it throws an exception: "Team with the requested ID could not be found".
I have attached ss of my code .
TL;DR
Issue: Developer is unable to fetch a list of users belonging to a specific team. Code throws an exception stating "Team with the requested ID could not be found."
Solution: The error suggests that the team with the specified ID does not exist. Double-check the ID being used for the team and ensure it is correct. Review the code and confirm that the team ID is being passed correctly to the function. If the issue persists, double-check the team's existence in the database and verify if it is being assigned properly to users.