Console error with widget in View mode, not present in Edit Mode with ZOHO.CRM.API.updateRecord(config)

Console error with widget in View mode, not present in Edit Mode with ZOHO.CRM.API.updateRecord(config)

hello

i have that function to update an account records (from a widgets created with sigma)

function handleCopyButtonCRMClick() {
console.log('handleCopyButtonCRMClick');
/*
* Fetch Information of Record passed in PageLoad
* and insert the response into the dom
*/
console.log('data.Entity : ' + sharedVariableEntityId);
ZOHO.CRM.API.getRecord({Entity:"Accounts",RecordID:sharedVariableEntityId})
.then(function(response)
{
console.log('response : ' + JSON.stringify(response));

var config={
Entity:"Accounts",
APIData:{
"id": sharedVariableEntityId,
"testzoho4__CF": "Zylker test 888899999"
},
Trigger:[]
}
ZOHO.CRM.API.updateRecord(config)
.then(function(data){
console.log(data)
})

//show the record information for debugging
if (sharedVariableDebug) {
document.getElementById("recordInfo").innerHTML = JSON.stringify(response, null, 2);
}
});
}

it works great when i use it in "EDIT" mode, when i trigger my widget from a button in "VIEW" mode, got js errors :

       PUT https://plugin-testzoho4.zohosandbox.com/crm/v2/Accounts 400 (Bad Request)
and that one
Uncaught (in promise) {data: Array(1), $responseHeaders: {…}}
Promise.then
(anonyme) @ helper.js:298
Promise.then
handleCopyButtonCRMClick @ helper.js:285


helper.js:298 it's  :
ZOHO.CRM.API.updateRecord(config)
.then(function(data){
console.log(data)

and  helper.js:285
ZOHO.CRM.API.getRecord({Entity:"Accounts",RecordID:sharedVariableEntityId})
.then(function(response)
{

})

it's about .then

Any infos about theses errors ?
Thanks

same for