thingdom / node-neo4j

[RETIRED] Neo4j graph database driver (REST API client) for Node.js
Apache License 2.0
925 stars 135 forks source link

Transaction expiration time depends on server timestamp #199

Open cah-kenankujovic opened 8 years ago

cah-kenankujovic commented 8 years ago

Hi, I ran into an issue where every transaction would fail with this message:

This transaction has expired. You can get the expiration time of a transaction through its expiresAt (Date) and expiresIn (ms) properties.

The issue turns out to be that Neo4J runs in Docker container, and this container had wrong time (about 3 minutes in past). This is somewhat known issue with Docker, and it very easy to fix it.

However, my question is this: What is the value of calculating the expiration time on the client? It seems to me this should handled by the server.

aseemk commented 8 years ago

Great point! You're right.

My intent was for node-neo4j on the server to just provide more helpful error messages than Neo4j itself often provides, but you highlight that this case can do more harm than good.

I'll look to fix! Thanks again.