serverless-cloudflare-workers icon indicating copy to clipboard operation
serverless-cloudflare-workers copied to clipboard

Exit code 0 when script fails to deploy

Open jonahwh opened this issue 5 years ago • 2 comments

We had a mistake in our serverless function, but the exit code of serverless deploy was still 0, even though this plugin reported a "Fatal Error".

./node_modules/serverless/bin/serverless deploy
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Starting Serverless Cloudflare-Worker deployment.
Serverless: deploying route: https://my-route.example.com/*
Serverless: ❌ Fatal Error, Script Not Deployed!
Serverless: --> Error Code:10021
--> Error Message: "Uncaught ReferenceError: window is not defined
at line 16
at line 1 in r
at line 1
at line 1
"
Serverless: ✅  Routes Deployed
Serverless: Finished deployment in 6.789 seconds.
Serverless: Finished Serverless Cloudflare-Worker deployment.
exit code: 0 duration: 8s

jonahwh avatar Apr 19 '19 22:04 jonahwh

I'm also seeing this when the route fails to deploy.

ZebraFlesh avatar Sep 13 '19 16:09 ZebraFlesh

I am also seeing this same issue in a GitHub action that I am using. Is there anything I can do get the action to fail when a script fails to deploy?

swelham avatar Feb 06 '20 14:02 swelham