在界面上配置外部数据源,测试连接时出错
Created by: yicone
添加了一个“外部数据源”后,点击“测试链接”按钮,页面上显示错误信息“Error: Fail at 0”,同时在程序运行日志中显示了报错信息。
错误堆栈:
(node:91174) UnhandledPromiseRejectionWarning: Error: Fail at 0
at /Users/Tr/Workspace/yicone/steedos-platform/node_modules/odata-v4-mongodb/node_modules/odata-v4-parser/src/parser.ts:17:28
at Object.filter (/Users/Tr/Workspace/yicone/steedos-platform/node_modules/odata-v4-mongodb/node_modules/odata-v4-parser/src/parser.ts:35:118)
at Object.createFilter (/Users/Tr/Workspace/yicone/steedos-platform/node_modules/odata-v4-mongodb/lib/index.js:12:67)
at SteedosMeteorMongoDriver.formatFiltersToMongoQuery (/Users/Tr/Workspace/yicone/steedos-platform/packages/objectql/src/driver/meteorMongo.ts:53:30)
at SteedosMeteorMongoDriver.getMongoFilters (/Users/Tr/Workspace/yicone/steedos-platform/packages/objectql/src/driver/meteorMongo.ts:69:42)
at SteedosMeteorMongoDriver.<anonymous> (/Users/Tr/Workspace/yicone/steedos-platform/packages/objectql/src/driver/meteorMongo.ts:177:33)
at step (/Users/Tr/Workspace/yicone/steedos-platform/node_modules/tslib/tslib.js:136:27)
at Object.next (/Users/Tr/Workspace/yicone/steedos-platform/node_modules/tslib/tslib.js:117:57)
at /Users/Tr/Workspace/yicone/steedos-platform/node_modules/tslib/tslib.js:110:75
at new Promise (<anonymous>)
at Object.__awaiter (/Users/Tr/Workspace/yicone/steedos-platform/node_modules/tslib/tslib.js:106:16)
at SteedosMeteorMongoDriver.findOne (/Users/Tr/Workspace/yicone/steedos-platform/packages/objectql/lib/driver/meteorMongo.js:178:24)
at SteedosDataSourceType.<anonymous> (/Users/Tr/Workspace/yicone/steedos-platform/packages/objectql/src/types/datasource.ts:294:36)
at step (/Users/Tr/Workspace/yicone/steedos-platform/node_modules/tslib/tslib.js:136:27)
at Object.next (/Users/Tr/Workspace/yicone/steedos-platform/node_modules/tslib/tslib.js:117:57)
at /Users/Tr/Workspace/yicone/steedos-platform/node_modules/tslib/tslib.js:110:75
at new Promise (<anonymous>)
at Object.__awaiter (/Users/Tr/Workspace/yicone/steedos-platform/node_modules/tslib/tslib.js:106:16)
at SteedosDataSourceType.findOne (/Users/Tr/Workspace/yicone/steedos-platform/packages/objectql/lib/types/datasource.js:244:24)
at SteedosObjectType.<anonymous> (/Users/Tr/Workspace/yicone/steedos-platform/packages/objectql/src/types/object.ts:709:47)
at step (/Users/Tr/Workspace/yicone/steedos-platform/node_modules/tslib/tslib.js:136:27)
at Object.next (/Users/Tr/Workspace/yicone/steedos-platform/node_modules/tslib/tslib.js:117:57)
(node:91174) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 10)
参考对话: