File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -950,7 +950,7 @@ they may not work as expected in the Lambda environment.
950950 }
951951
952952 _isFunctionDoesNotExist ( err ) {
953- return err . code === 'ResourceNotFoundException' &&
953+ return err . name === 'ResourceNotFoundException' &&
954954 ! ! err . message . match ( / ^ F u n c t i o n n o t f o u n d : / )
955955 }
956956
Original file line number Diff line number Diff line change @@ -219,15 +219,15 @@ describe('lib/main', function () {
219219 describe ( '_isFunctionDoesNotExist' , ( ) => {
220220 it ( '=== true' , ( ) => {
221221 const err = {
222- code : 'ResourceNotFoundException' ,
222+ name : 'ResourceNotFoundException' ,
223223 message : 'Function not found: arn:aws:lambda:XXX'
224224 }
225225 assert . isTrue ( lambda . _isFunctionDoesNotExist ( err ) )
226226 } )
227227
228228 it ( '=== false' , ( ) => {
229229 const err = {
230- code : 'MissingRequiredParameter' ,
230+ name : 'MissingRequiredParameter' ,
231231 message : 'Missing required key \'FunctionName\' in params'
232232 }
233233 assert . isFalse ( lambda . _isFunctionDoesNotExist ( err ) )
You can’t perform that action at this time.
0 commit comments