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