Skip to content

Commit

Permalink
fix(interface):change exception handling for version comparison betwe…
Browse files Browse the repository at this point in the history
…en gateway account and gateway
  • Loading branch information
chengenguan committed Nov 26, 2018
1 parent 2cb275a commit 0972d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interface/gateways.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = (router) => {
}
const account = await app.sdb.findOne('GatewayAccount', { condition })
const gw = await app.sdb.findOne('Gateway', { condition: { name: req.params.name } })
if (account.version !== gw.version) throw new Error('Account version is not consistent with gateway version')
if (account.version !== gw.version) return 'Account version is not consistent with gateway version'
if (!account) return 'Gateway account not found'
return { account }
})
Expand Down

0 comments on commit 0972d31

Please sign in to comment.