Skip to content

Commit

Permalink
refactor: nit
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jul 5, 2022
1 parent 18c2b41 commit 5180b25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/events/authValidateContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ function internalServerError(message) {
const errorType = 'AuthorizerConfigurationException'

const error = Boom.internal()
error.output.payload.message = message

error.output.payload.error = errorType
error.output.payload.message = message
error.output.headers['x-amzn-ErrorType'] = errorType

return error
Expand All @@ -17,7 +18,7 @@ function internalServerError(message) {
function isValidContext(context) {
return values(context).every(
(i) =>
typeof i === 'string' || typeof i === 'boolean' || typeof i === 'number',
typeof i === 'boolean' || typeof i === 'number' || typeof i === 'string',
)
}

Expand Down

0 comments on commit 5180b25

Please sign in to comment.