@tachybase/module-error-handler 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
- "@tachybase/client": "1.6.0",
3
- "@tachybase/schema": "1.3.52",
4
- "@tego/server": "1.3.52",
2
+ "@tachybase/client": "1.6.1",
3
+ "@tachybase/schema": "1.6.0-alpha.9",
4
+ "@tego/server": "1.6.0-alpha.9",
5
5
  "lodash": "4.17.21"
6
6
  };
File without changes
@@ -60,7 +60,7 @@ class ErrorHandler {
60
60
  try {
61
61
  await next();
62
62
  } catch (err) {
63
- ctx.log.error(err.message, { method: "error-handler", err: err.stack });
63
+ ctx.logger.error(err.message, { method: "error-handler", err: err.stack });
64
64
  for (const handler of self.handlers) {
65
65
  if (handler.guard(err)) {
66
66
  return handler.render(err, ctx);
@@ -52,7 +52,7 @@ class PluginErrorHandler extends import_server.Plugin {
52
52
  }
53
53
  const model = instance.constructor;
54
54
  const dataSourceKey = ctx.get("x-data-source");
55
- const dataSource = ctx.app.dataSourceManager.dataSources.get(dataSourceKey);
55
+ const dataSource = ctx.tego.dataSourceManager.dataSources.get(dataSourceKey);
56
56
  const database = dataSource ? dataSource.collectionManager.db : ctx.db;
57
57
  const collection = database.modelCollection.get(model);
58
58
  const field = collection.getField(path);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/module-error-handler",
3
3
  "displayName": "Error handler",
4
- "version": "1.6.0",
4
+ "version": "1.6.1",
5
5
  "description": "Handling application errors and exceptions.",
6
6
  "keywords": [
7
7
  "System management"
@@ -10,13 +10,13 @@
10
10
  "main": "./dist/server/index.js",
11
11
  "dependencies": {},
12
12
  "devDependencies": {
13
- "@tachybase/schema": "1.3.52",
14
- "@tachybase/test": "1.3.52",
15
- "@tego/client": "1.3.52",
16
- "@tego/server": "1.3.52",
13
+ "@tachybase/schema": "1.6.0-alpha.9",
14
+ "@tachybase/test": "1.6.0-alpha.9",
15
+ "@tego/client": "1.6.0-alpha.9",
16
+ "@tego/server": "1.6.0-alpha.9",
17
17
  "lodash": "4.17.21",
18
18
  "supertest": "^7.1.3",
19
- "@tachybase/client": "1.6.0"
19
+ "@tachybase/client": "1.6.1"
20
20
  },
21
21
  "description.zh-CN": "处理应用程序中的错误和异常。",
22
22
  "displayName.zh-CN": "错误处理器",