emailContact no longer working

Hello all.

I have this code:

import { triggeredEmails } from ‘wix-crm-backend’ ;

export function doSomething ( item ) {

**let**  options  = { 
    variables : { 
        "forName" :  item . name , 
        "type" :  item . mainType , 
        "message" :  item . type , 
        "level" :  item . level , 
        "orderID" :  item . orderId , 
        "url" :  item . url , 
    } 
} 

return triggeredEmails . emailContact ( type , item . buyerID , options )
. then (() => {
wixData . insert ( ‘Testing’ , { “got to” : ‘email success’ , “stuff” : item });

    }) 
    . **catch** (( error ) => { 
        console . log ( error ); 
       wixData . insert ( 'Testing' , {  "got to" :  'email error' ,  "error" :  error ,  'byerID' :  item . buyerID }); 
    }); 

}

This worked fine 2 weeks ago, just come to test again and it’s catching an error. However, whenever I dump that error into the database all I get is an empty object:

Has something changed on the wix back-end? Or have a made a mistake here somewhere?

I am aware that using emailContact will not allow you to email the admin email address, so I tried another email. Still no luck

An update on this… if I completely remove the “options” variable, the email does send successfully (obviously without data passed to it).

I believe my object is setup correctly? This is the output…

{
  "variables": {
    "orderID": 10142,
    "url": "https://us1.pdfgeneratorapi.com/share/22739/4d70",
    "type": "Baby",
    "forName": "hey there",
    "level": "Tell"
  }
}

I have also tried putting it into the function directly, still fails…

return triggeredEmails.emailContact(type, item.buyerID, {
            variables: {
                orderID: item.orderId,
                url: item.url,
                mainType: item.name,
                type: item.mainType,
                forName: item.forName,
                level: item.level
            }
        })