q-koa 12.3.3 → 12.3.4

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.
package/core/app.js CHANGED
@@ -231,7 +231,7 @@ class APP {
231
231
  ) {
232
232
  return await next()
233
233
  }
234
- throw new Error('没有权限或登录失效,请重新登录')
234
+ throw new ServiceError('没有权限或登录失效,请重新登录')
235
235
  }
236
236
  await next()
237
237
  })
@@ -48,7 +48,7 @@ module.exports = class Singleton {
48
48
  .then((res) => res.data)
49
49
 
50
50
  if (data.status === 0) return data.result
51
- throw new Error(data.message)
51
+ throw new Error(`${this.key.split('-')[0]}${data.message}`)
52
52
  }
53
53
 
54
54
  async getToLngAndLat(name) {
@@ -61,7 +61,7 @@ module.exports = class Singleton {
61
61
  if (data.message === '查询无结果') {
62
62
  throw new Error(`找不到【${name}】,可能需要更详细一点(省市区)`)
63
63
  } else {
64
- throw new Error(data.message)
64
+ throw new Error(`${this.key.split('-')[0]}${data.message}`)
65
65
  }
66
66
  }
67
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "12.3.3",
3
+ "version": "12.3.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {