提交 363e64e4 编写于 作者: 雪洛's avatar 雪洛

refactor: rename ID -> Id

上级 2bd9f960
......@@ -28,7 +28,7 @@ const ERROR = {
BIND_CONFLICT: 'uni-id-bind-conflict'
}
function isUniIDError (errCode) {
function isUniIdError (errCode) {
return Object.values(ERROR).includes(errCode)
}
......@@ -42,6 +42,6 @@ class UniCloudError extends Error {
module.exports = {
ERROR,
isUniIDError,
isUniIdError,
UniCloudError
}
......@@ -6,7 +6,7 @@ const {
} = require('./common/utils')
const ConfigUtils = require('./lib/utils/config')
const {
isUniIDError
isUniIdError
} = require('./common/error')
const middleware = require('./middleware/index')
......@@ -124,7 +124,7 @@ module.exports = {
// 处理中间件内抛出的标准响应对象
if (error.errCode && getType(error) === 'object') {
const errCode = error.errCode
if (!isUniIDError(errCode)) {
if (!isUniIdError(errCode)) {
return error
}
return {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册