Pending state not returned when user requests to join team

Hi, I’m using Octokit to request the current membership status of a user in an organisation team using

const response = await octokit.teams.getMembershipForUserInOrg({

Tried using these endpoints:

When that user is in the team it returns a 200 with the state as active and returns a 404 when the user isn’t in the team. However, according to the docs, it should return a 200 when they are in the pending state too, When that user clicks the “Request to join team” button on GitHub it doesn’t seem to set them into a pending state and still returns 404.

Does the pending state only apply for invites? and doesn’t work when requesting to join?