Error 500 on myApproveByEmailFunction

Question:
I am calling this Wix code which is used to APPROVE members. The email address is properly passed in, however on the OUTPUT, I am getting a Status Code 500.

Product:
Wix Velo: Approve By Email | VELO

What are you trying to achieve:
Approval should be successful, but it is not any longer. At some point, Wix changed the code and I have subsequently updated it to be exactly what they have, to no avail. The only way for me to approve the member is by logging into Wix and clicking the APPROVE button which is not what I need.

import { Permissions, webMethod } from "wix-web-module";
import { authentication } from "wix-members-backend";

export const myApproveByEmailFunction = webMethod(
  Permissions.Anyone,
  (email) => {
    return authentication
      .approveByEmail(email)
      .then((sessionToken) => {
        return {
          sessionToken: sessionToken,
          approved: true,
        };
      })
      .catch((error) => {
        return {
          approved: false,
          reason: error,
        };
      });
  },
);

Your insight and assistance is greatly appreciated.

Thank you!