How to handle Deadlocks using the javascript neo4j driver?

I'm using the javascript neo4j-driver and Neo4j Aura ,sometimes I'm facing this error :

Neo4jError: ForsetiClient[3] can't acquire ExclusiveLock{owner=ForsetiClient[0]} on INDEX_ENTRY(5454851920060587002), because holders of that lock are waiting for ForsetiClient[3].\n Wait list:ExclusiveLock[\nClient[0] waits for [3]]

how can i handle that using javascript and thank you !