Harden OMNL dotenv layering and local health

This commit is contained in:
defiQUG
2026-07-05 17:31:33 -07:00
parent abdd8881e2
commit 8ee8930b5b
6 changed files with 278 additions and 132 deletions

View File

@@ -165,6 +165,19 @@ export class ApiServer {
},
});
} catch (error) {
if (this.resolveFeatureFlag('TOKEN_AGGREGATION_DB_OPTIONAL', false)) {
res.json({
status: 'degraded',
mode: 'database-optional',
timestamp: new Date().toISOString(),
services: {
database: 'unavailable',
indexer: this.indexerEnabled ? 'running' : 'disabled',
},
error: error instanceof Error ? error.message : 'Unknown error',
});
return;
}
res.status(503).json({
status: 'unhealthy',
timestamp: new Date().toISOString(),