safeguards-plugin icon indicating copy to clipboard operation
safeguards-plugin copied to clipboard

safeguard fails when function entries are empty

Open gidonk-pr opened this issue 2 years ago • 2 comments

if serverless.yaml file has no defined functions it will fail with the following exception:

Error:
TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at resolveArgsSchema (/Users/gidonk/repos/ciq/ciq-front/ciq-sites/node_modules/serverless/lib/cli/resolve-input.js:13:45)
    at /Users/gidonk/repos/ciq/ciq-front/ciq-sites/node_modules/serverless/lib/cli/resolve-input.js:41:5
    at memoized (/Users/gidonk/repos/ciq/ciq-front/ciq-sites/node_modules/memoizee/lib/configure-map.js:80:41)
    at /Users/gidonk/repos/ciq/ciq-front/ciq-sites/node_modules/serverless/scripts/serverless.js:590:15
    at /Users/gidonk/repos/ciq/ciq-front/ciq-sites/node_modules/serverless/scripts/serverless.js:725:9

gidonk-pr avatar Apr 03 '22 08:04 gidonk-pr

Hello @gidonk-pr - thanks for reporting and sorry you've run into trouble. Would you be able to provide a minimal reproducible example of this bug? That would help us out diagnose it. Thanks in advance 🙇

pgrzesik avatar Apr 03 '22 18:04 pgrzesik

@gidonk-pr please also state which version of the Framework you're using

medikoo avatar Apr 04 '22 13:04 medikoo