Closed beraujjwal closed 11 months ago
@beraujjwal, thanks for reporting. Could you please inform the driver and neo4j versions?
I executed your sample locally and get a different error:
Neo4jError: Expected parameter(s): tokenSalt, deletedAt, createdAt, updatedAt
constructor: [Function: Neo4jError] { isRetriable: [Function (anonymous)] },
code: 'Neo.ClientError.Statement.ParameterMissing',
retriable: false
}
Closing issue due inactivity. You can open the issue whenever you have new evidences.
Bug Report
I am facing this error ` TypeError: Cannot read properties of undefined (reading 'startsWith')
` Here is my helper code
try { const session = driver.session({ database, defaultAccessMode: neo4j.session.WRITE }); return session.run(cypher, params).then(result => { console.log(result); result.records.forEach(record => { console.log(record) }); return result.records; }).catch(err => { console.log(err); throw new Error(err.message); }).finally(() => { session.close(); }); } catch (err) { throw new Error(err.message); }
Cypher Code
` CREATE (u:User { uuid: $_id, name: $name, phone: $phone, email: $email, password: $password, tokenSalt: $tokenSalt, isEmailVerified: $isEmailVerified, isPhoneVerified: $isPhoneVerified, deleted: $deleted, status: $status, verified: $verified, deletedAt: $deletedAt, blockExpires: $blockExpires, createdAt: $createdAt, updatedAt: $updatedAt })
WITH u, $roles AS roles
MATCH (r:Role) WHERE r.uuid in roles CREATE (u)-[:HAS_ROLE]->(r)
RETURN u `
Params
` { isEmailVerified: false, isPhoneVerified: false, verified: true, roles: [ 'a48cde8a-efea-4a1f-9c9e-53b8d48a5b3f' ], loginAttempts: 0, deviceId: null, deviceType: null, fcmToken: null, deleted: false, status: true, name: '** ', email: '**@gmail.com', phone: '##########', password: '**', blockExpires: '2023-07-29T01:59:40.283Z', rights: [], _id: '17ce0fd7-b0c4-4117-8d73-0a0a8af8a1a0' }
`