Harden OMNL dotenv layering and local health
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user