[easy] fail more gracefully when no functions folder
See original GitHub issue- Do you want to request a feature or report a bug?
feature
- What is the current behavior?
when a functions field is specified but the folder doesnt exist, we should create it, or warn and exit. instead, now we show this error:
Error: ENOENT: no such file or directory, scandir 'lambda'
at createHandler (~/Netlify/netlify-dev-plugin/node_modules/@netlify/zip-it-and-ship-it/src/serve.js:61:6)
at serveFunctions (~/Netlify/netlify-dev-plugin/node_modules/@netlify/zip-it-and-ship-it/src/serve.js:159:16)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Bash: graceful function death on error - Stack Overflow
For my scripts, I am using an exception handling technique where I return errors in a way that is not return codes, and...
Read more >Fatal errors due to non-existent objects [#941774] | Drupal.org
... (below) and fail more gracefully, I've added a simple check that the object in question does exist. If it does not, the...
Read more >how to gracefully handle rsync failing, sometimes, to correctly ...
Running Ubuntu 16.04 LTS fully updated on remote webserver Running rsync 3.1.1 on remote webserver. I have a fairly simple setup where I ......
Read more >Best Practices for Node.js Error-handling - Toptal
It is not hard to see that some people are struggling to handle errors, and some are even totally missing it. Handling errors...
Read more >Node.js Error Handling Best Practices - Sematext
It's a classic case of programmer error. Here are a few more: called an asynchronous function without a callback; did not resolve a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is fixed as part of #48. I’ve also added a unit test as part of #47.
yup im suggesting stealing the error msg