Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/core/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ class Session {
resultPromise = Promise.reject(
newError(
'Queries cannot be run directly on a ' +
'session with an open transaction; either run from within the ' +
'transaction or use a different session.'
'session with ongoing work; either await the previous work, ' +
'run in an existing transaction or use a different session.'
)
)
}
Expand Down Expand Up @@ -316,8 +316,8 @@ class Session {
}
if (this._hasTx) {
throw newError(
'You cannot begin a transaction on a session with an open transaction; ' +
'either run from within the transaction or use a different session.'
'You cannot begin a transaction on a session with ongoing work; ' +
'either run from within an existing transaction or use a different session.'
)
}

Expand Down
8 changes: 4 additions & 4 deletions packages/neo4j-driver-deno/lib/core/session.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/neo4j-driver/test/nested-statements.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ describe('#integration session', () => {
expect(true).toBe(false)
} catch (e) {
expect(e.message).toBe(
'Queries cannot be run directly on a session with an open transaction; ' +
'either run from within the transaction or use a different session.'
'Queries cannot be run directly on a session with ongoing work; either ' +
'await the previous work, run in an existing transaction or use a different session.'
)
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/neo4j-driver/test/rx/nested-statements.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ describe('#integration-rx transaction', () => {
)
.toPromise()

expect(result[0].error.message).toMatch(/Queries cannot be run directly on a session with an open transaction/)
expect(result[0].error.message).toMatch(/Queries cannot be run directly on a session with ongoing work/)
})
})
7 changes: 3 additions & 4 deletions packages/neo4j-driver/test/session.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,8 @@ describe('#integration session', () => {
// Then
session.run('RETURN 42').catch(error => {
expect(error.message).toBe(
'Queries cannot be run directly on a ' +
'session with an open transaction; either run from within the ' +
'transaction or use a different session.'
'Queries cannot be run directly on a session with ongoing work; either ' +
'await the previous work, run in an existing transaction or use a different session.'
)
done()
})
Expand All @@ -296,7 +295,7 @@ describe('#integration session', () => {

// Then
expect(() => session.beginTransaction()).toThrowError(
/You cannot begin a transaction on a session with an open transaction/
/You cannot begin a transaction on a session with ongoing work/
)
}, 70000)

Expand Down