Wix Users API - 500 Server Error

Hey guys,

So I have a custom registration form on my site and I have a .catch to handle the error during the registration process but it never ‘catches’ the error.

It used to work before but I’m just getting a 500 Server Error response on the console. See below.

This is what I have on the custom registration lightbox.

function register() {
    wixUsers.register($w("#email").value, $w("#password").value, {
 "contactInfo": {
 "firstName": $w("#fname").value,
 "lastName": $w("#lname").value
        }
    })
    .then( () => {
        wixLocation.to('/plans-pricing');
    })
    .catch( (err) => {
        $w("#error").text = 'This email is registered or invalid';
        $w("#error").show();
        $w("#register").enable();
        $w("#register").label = 'Register';
        hideError();
    });
}