From 5990ba59412db441004001bf3a502c2010a08218 Mon Sep 17 00:00:00 2001 From: Ruben Oostinga <0xR@users.noreply.github.com> Date: Sat, 28 Jul 2018 17:44:37 +0200 Subject: [PATCH] Fix typo to get proper error message Otherwise you get: `error is not defined` --- .../appsync-operations/helpers/helper-resolvers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/backend-operations/appsync-operations/helpers/helper-resolvers.js b/lib/backend-operations/appsync-operations/helpers/helper-resolvers.js index c0224c0..9becfe2 100644 --- a/lib/backend-operations/appsync-operations/helpers/helper-resolvers.js +++ b/lib/backend-operations/appsync-operations/helpers/helper-resolvers.js @@ -110,7 +110,7 @@ function readResolverMappings(containerDirPath, resolver){ if(fs.existsSync(requestMappingFilePath)){ resolver.requestMappingTemplate = fs.readFileSync(requestMappingFilePath).toString() }else{ - throw new error('can not find mapping file: ' + requestMappingFilePath) + throw new Error('can not find mapping file: ' + requestMappingFilePath) } } @@ -124,7 +124,7 @@ function readResolverMappings(containerDirPath, resolver){ if(fs.existsSync(responseMappingFilePath)){ resolver.responseMappingTemplate = fs.readFileSync(responseMappingFilePath).toString() }else{ - throw new error('can not find mapping file: ' + responseMappingFilePath) + throw new Error('can not find mapping file: ' + responseMappingFilePath) } } }