This is because the `sub` attribute is not populated in the access token for migrated users, so this lookup fails: ``` const user = await userPool.getUserByUsername(ctx, decodedToken.sub); if (!user) { throw new import_errors.UserNotFoundError(); } ```