Skip to content

Commit

Permalink
fix raiseUnauthorized to avoid doubled descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
felixheck committed Jan 28, 2018
1 parent ef0d68b commit 98bfeef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.js
Expand Up @@ -118,7 +118,7 @@ function verify (opts) {
function raiseUnauthorized (err, msg, reason, scheme = 'Bearer') {
return boom.unauthorized(err ? err.message : msg, scheme, {
strategy: 'keycloak-jwt',
...(reason ? { reason } : {})
...(reason && !err ? { reason } : {})
})
}

Expand Down

0 comments on commit 98bfeef

Please sign in to comment.