Skip to content

Commit

Permalink
fix: handle error on token store endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoboucas committed Aug 10, 2018
1 parent 38ee0e6 commit b71c740
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dadi/lib/auth/index.js
@@ -1,5 +1,6 @@
const clientModel = require('./../model/acl/client')
const config = require('./../../../config')
const help = require('./../help')
const jwt = require('jsonwebtoken')

const AuthMiddleware = function (server) {
Expand Down Expand Up @@ -125,6 +126,8 @@ AuthMiddleware.prototype.generateToken = function (req, res, next) {

return res.end(JSON.stringify(response))
})
}).catch(error => {
return help.sendBackJSON(null, res, next)(error)
})
}

Expand Down

0 comments on commit b71c740

Please sign in to comment.