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

Fix user error reporting #1005

Merged

Conversation

medikoo
Copy link
Contributor

@medikoo medikoo commented Nov 19, 2021

In Serverless Framework all user errors are expected to be reported with ServerlessError instance (class accessible at this.serverless.classes.Error) otherwise error is assumed as programmatic, and when thrown, whole stack trace is presented.

This patch ensures that those common user errors are reported with ServerlessError

@medikoo medikoo force-pushed the 1119-improve-error-reporting branch from ee3be9f to 14a7f12 Compare November 19, 2021 15:00
@j0k3r
Copy link
Member

j0k3r commented Nov 19, 2021

Does this.serverless.classes.Error exist in each Serverless version (1.x & 2.x)?

@medikoo
Copy link
Contributor Author

medikoo commented Nov 19, 2021

Does this.serverless.classes.Error exist in each Serverless version (1.x & 2.x)?

Yes, it's there since v1.0.0: https://github.com/serverless/serverless/blob/v1.0.0/lib/Serverless.js#L42

@j0k3r j0k3r added this to the 5.6.0 milestone Nov 19, 2021
@j0k3r
Copy link
Member

j0k3r commented Nov 19, 2021

@medikoo One more rebase :)

@medikoo medikoo force-pushed the 1119-improve-error-reporting branch from 14a7f12 to a542ec4 Compare November 19, 2021 19:02
@medikoo
Copy link
Contributor Author

medikoo commented Nov 19, 2021

@j0k3r rebased :)

@j0k3r j0k3r merged commit d70f9cb into serverless-heaven:master Nov 19, 2021
@j0k3r j0k3r mentioned this pull request Nov 22, 2021
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

Successfully merging this pull request may close these issues.

3 participants