mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 20:27:22 +00:00
fix: error display
This commit is contained in:
parent
01faadb0b4
commit
a4d5814adf
@ -100,10 +100,11 @@ export class DataSourceModel extends Model {
|
|||||||
localData: await this.loadLocalData(),
|
localData: await this.loadLocalData(),
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.app.logger.error(`load data source failed, ${e.message}`);
|
app.logger.error(`load data source failed, ${e.message}`);
|
||||||
|
|
||||||
pluginDataSourceManagerServer.dataSourceStatus[dataSourceKey] = 'failed';
|
pluginDataSourceManagerServer.dataSourceStatus[dataSourceKey] = 'failed';
|
||||||
pluginDataSourceManagerServer.dataSourceErrors[dataSourceKey] = e;
|
pluginDataSourceManagerServer.dataSourceErrors[dataSourceKey] = e;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginDataSourceManagerServer.dataSourceStatus[dataSourceKey] = 'loaded';
|
pluginDataSourceManagerServer.dataSourceStatus[dataSourceKey] = 'loaded';
|
||||||
|
@ -127,7 +127,7 @@ export class PluginDataSourceManagerServer extends Plugin {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (dataSourceStatus === 'failed') {
|
if (dataSourceStatus === 'failed') {
|
||||||
item['errorMessage'] = this.dataSourceErrors[dataSourceModel.get('key')].message;
|
item['errorMessage'] = plugin.dataSourceErrors[dataSourceModel.get('key')].message;
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataSource = app.dataSourceManager.dataSources.get(dataSourceModel.get('key'));
|
const dataSource = app.dataSourceManager.dataSources.get(dataSourceModel.get('key'));
|
||||||
|
Loading…
Reference in New Issue
Block a user