teamMetadataSchema.parse(team?.metadata) was called before checking if team exists, causing a Zod validation error on undefined instead of the intended NotFoundException. Also corrected the misleading error message from 'user not found' to 'team not found'. Co-authored-by: Pranav Gawande <pranavv00@users.noreply.github.com> Co-authored-by: Bandhan Majumder <133476557+bandhan-majumder@users.noreply.github.com>