Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard error instead of only a log when there is a error! #60

Open
vinnie1234 opened this issue Nov 9, 2021 · 1 comment
Open

Hard error instead of only a log when there is a error! #60

vinnie1234 opened this issue Nov 9, 2021 · 1 comment

Comments

@vinnie1234
Copy link

When there is an error the log is only a text log and not a hard error. Is it possible to make it a hard error so serverless stop the process?

Globals.ts
public static logError (message: any, debug = false): void { const canLog = (debug && process.env.SLS_DEBUG) || !debug; if (canLog) { Globals.cliLog("Error:", message); } }

Types.ts
cli: { log (str: string, entity?: string), consoleLog (str: any), };

@ghost
Copy link

ghost commented Oct 27, 2022

Yeah this bit me today. Was launching a new environment and due to reasons the vpc discovery plugin could not find the vpc. The tags didn't match (i.e., stage vs staging). All of the serverless resources that had vpc context (such as lambdas) were launched without vpc context instead of just dying. Was mildly surprising and had to do a full sls remove to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant