throw clear error about unavailable db nodes
This commit is contained in:
parent
a82dacdc30
commit
e3e7623c27
@ -337,6 +337,9 @@ class MariaDB
|
||||
const pool = this.#pool;
|
||||
if (nodeName)
|
||||
{
|
||||
const available = this.#nodes.filter(n => n.status === 'synced');
|
||||
if (!available.length)
|
||||
throw new Error('No nodes available for query');
|
||||
const node = this.#nodes.find(n => n.name === nodeName);
|
||||
if (!node)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user