# Passive Event Handlers - Getting Failed POST Error

**URL:** <https://forum.wixstudio.com/t/passive-event-handlers-getting-failed-post-error/35445>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [September 19, 2022, 11:44pm UTC](https://forum.wixstudio.com/t/passive-event-handlers-getting-failed-post-error/35445 "2022-09-19T23:44:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kidcopernicus](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/kidcopernicus/32/34167_2.png) [@kidcopernicus](https://forum.wixstudio.com/u/kidcopernicus)\
**Post date:** [September 19, 2022, 11:44pm UTC](https://forum.wixstudio.com/t/passive-event-handlers-getting-failed-post-error/35445/1 "2022-09-19T23:44:20Z")

</div>

Created (with help) an event handler that works great in the Editor. Updates First Secret in the Secrets Manager.

Published version fails. Looks like a POST error of some kind? Possibly related to not being a passive event handler? This one’s a real mystery to me. Can send more Google F12 info if that helps.

import { updateUserValue } **from** ‘backend/events.jsw’

$w . onReady ( **function** () {  
$w ( ‘#button99’ ). onClick (( event ) =\> {  
updateUserValue($w ( ‘#usertext99’ ). value );  
});  
});

jsw code:

import wixSecretsBackend **from** ‘wix-secrets-backend’ ;

export function updateUserValue ( twitterHandle ) {  
**const** id = “8ce0b5b9-6dcb-462a-b8d8-49ef15297f34” ;  
**const** secret = {  
value : twitterHandle ,  
};

```
**return** wixSecretsBackend . updateSecret ( id , secret ) 
    . then (() => { 
        console . log ( "Science, b*tch!" ); 
    }) 
    . **catch** (( error ) => { 
        console . error ( error ); 
    }) 

```

}

How would I add { passive : **true** } to the event handler with the Velo syntax? It’s not in the docs and .addEventListener ends up undefined I suspect because of $w namespace.

Any ideas greatly appreciated!

---

<div class="post-metadata">

**Author:** ![kidcopernicus](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/kidcopernicus/32/34167_2.png) [@kidcopernicus](https://forum.wixstudio.com/u/kidcopernicus)\
**Post date:** [September 20, 2022, 4:54pm UTC](https://forum.wixstudio.com/t/passive-event-handlers-getting-failed-post-error/35445/2 "2022-09-20T16:54:29Z")

</div>

Bump! Velo doesn’t seem to like certain syntax conventions.

.addEventListener didn’t play nice but of course it could be my ignorance of proper syntax. Or maybe it isn’t supported?? Didn’t see an entry for it in the docs, though it seems like standard javascript, no?
