From 5180b25c2ab11254c7a7b12758a72de8976d8ae3 Mon Sep 17 00:00:00 2001 From: Daniel Nalborczyk Date: Mon, 4 Jul 2022 21:12:49 -0400 Subject: [PATCH] refactor: nit --- src/events/authValidateContext.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/events/authValidateContext.js b/src/events/authValidateContext.js index 28ef5d6b8..f2fbfd579 100644 --- a/src/events/authValidateContext.js +++ b/src/events/authValidateContext.js @@ -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 @@ -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', ) }