function handleError(code: JoinTokenErrorCode) {
switch (code) {
case TOKEN_NOT_FOUND:
return 'Invalid invite link';
case TOKEN_EXPIRED:
return 'This invite link has expired';
case INVALID_PASSWORD:
return 'Incorrect password';
case USER_NOT_AUTHORIZED:
return 'You are not authorized to join with this link';
case ROOM_NOT_ACTIVE:
return 'The room is not active yet. Please wait for the host.';
default:
return 'An error occurred';
}
}
Union type of all possible join token error codes.