Improve NocoDB configuration logging with specific missing variables and success message
All checks were successful
Build and Push Docker Images / docker (push) Successful in 2m26s
All checks were successful
Build and Push Docker Images / docker (push) Successful in 2m26s
This commit is contained in:
parent
dc4fc45c4f
commit
dc4506156c
@ -12,8 +12,20 @@ class NocoDBClient {
|
|||||||
ordersTableId: process.env.NOCODB_ORDERS_TABLE_ID || '',
|
ordersTableId: process.env.NOCODB_ORDERS_TABLE_ID || '',
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!this.config.baseUrl || !this.config.baseId || !this.config.apiKey || !this.config.ordersTableId) {
|
// Check configuration completeness
|
||||||
console.warn('⚠️ NocoDB configuration incomplete. Database integration disabled.');
|
const missingVars = [];
|
||||||
|
if (!this.config.baseUrl) missingVars.push('NOCODB_BASE_URL');
|
||||||
|
if (!this.config.baseId) missingVars.push('NOCODB_BASE_ID');
|
||||||
|
if (!this.config.apiKey) missingVars.push('NOCODB_API_KEY');
|
||||||
|
if (!this.config.ordersTableId) missingVars.push('NOCODB_ORDERS_TABLE_ID');
|
||||||
|
|
||||||
|
if (missingVars.length > 0) {
|
||||||
|
console.warn('⚠️ NocoDB configuration incomplete. Missing variables:', missingVars.join(', '));
|
||||||
|
console.warn(' Database integration will be disabled.');
|
||||||
|
} else {
|
||||||
|
console.log('✅ NocoDB client initialized successfully');
|
||||||
|
console.log(` Base URL: ${this.config.baseUrl}`);
|
||||||
|
console.log(` Table ID: ${this.config.ordersTableId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.baseUrl = `${this.config.baseUrl}/api/v2/tables/${this.config.ordersTableId}/records`;
|
this.baseUrl = `${this.config.baseUrl}/api/v2/tables/${this.config.ordersTableId}/records`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user