SYNC: errors assign

This commit is contained in:
Jan Prochazka
2026-03-18 09:02:42 +01:00
committed by Diflow
parent 4915f57abb
commit 1f3b1963d9
5 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -103,7 +103,7 @@ function ensureDependencies(dir, checkFile) {
env: process.env,
});
if (result.status !== 0) {
throw new Error(`DBGM-00000 Failed to install dependencies in ${dir}`);
throw new Error(`DBGM-00297 Failed to install dependencies in ${dir}`);
}
}
@@ -135,7 +135,7 @@ async function waitForReady(url, timeoutMs = 30000) {
}
await delay(500);
}
throw new Error(`DBGM-00000 Server at ${url} did not start in time`);
throw new Error(`DBGM-00305 Server at ${url} did not start in time`);
}
// --- Main ---
+2 -2
View File
@@ -27,7 +27,7 @@ async function waitForApiReady(timeoutMs = 30000) {
await delay(500);
}
throw new Error('DBGM-00000 test-api did not start on port 4444 in time');
throw new Error('DBGM-00306 test-api did not start on port 4444 in time');
}
function readProcessStartTime(pid) {
@@ -116,7 +116,7 @@ function ensureTestApiDependencies() {
});
if (result.status !== 0) {
throw new Error('DBGM-00000 Failed to install test-api dependencies');
throw new Error('DBGM-00307 Failed to install test-api dependencies');
}
}
@@ -595,7 +595,7 @@ module.exports = {
try {
existing.subprocess.send({ msgtype: 'ping' });
} catch (err) {
logger.error(extractErrorLogData(err), 'DBGM-00000 Error pinging DB connection');
logger.error(extractErrorLogData(err), 'DBGM-00308 Error pinging DB connection');
this.close(conid, database);
}
}
@@ -650,7 +650,7 @@ module.exports = {
for (const [msgid, entry] of Object.entries(this.requests)) {
const [resolve, reject, additionalData, reqConid, reqDatabase] = entry;
if (reqConid === conid && reqDatabase === database) {
reject('DBGM-00000 Database connection closed');
reject('DBGM-00309 Database connection closed');
delete this.requests[msgid];
}
}
+1 -1
View File
@@ -235,7 +235,7 @@ module.exports = {
throw new Error('Invalid session');
}
logger.info({ sesid, level }, 'DBGM-00000 Setting transaction isolation level');
logger.info({ sesid, level }, 'DBGM-00315 Setting transaction isolation level');
session.subprocess.send({ msgtype: 'setIsolationLevel', level });
return { state: 'ok' };
+3 -3
View File
@@ -24,7 +24,7 @@ function resolveServiceRoot(contextUrl: string | undefined, fallbackUrl: string)
async function loadODataServiceDocument(dbhan: any) {
if (!dbhan?.connection?.apiServerUrl1) {
throw new Error('DBGM-00000 OData endpoint URL is not configured');
throw new Error('DBGM-00330 OData endpoint URL is not configured');
}
const response = await dbhan.axios.get(dbhan.connection.apiServerUrl1, {
@@ -33,11 +33,11 @@ async function loadODataServiceDocument(dbhan: any) {
const document = response?.data;
if (!document || typeof document !== 'object') {
throw new Error('DBGM-00000 OData service document is empty or invalid');
throw new Error('DBGM-00331 OData service document is empty or invalid');
}
if (!document['@odata.context']) {
throw new Error('DBGM-00000 OData service document does not contain @odata.context');
throw new Error('DBGM-00332 OData service document does not contain @odata.context');
}
return document;