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 server start handling (callback -> promise) #684

Merged
merged 2 commits into from Jun 3, 2019
Merged

Fix server start handling (callback -> promise) #684

merged 2 commits into from Jun 3, 2019

Conversation

dnalborczyk
Copy link
Collaborator

closes: #683

hapi server callback is now a promise. not quite sure about the error handling recommendation. (console.error, process.exit) previously the callback error being wrapped in a promise was not being handled down the chain as far as I could tell (might have missed it).

// TODO FIXME
// should we just write the error to console and exit?
console.error('Unexpected error in serverless-offline.', e);
process.exit(1);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Unexpected error while starting serverless-offline server:' would be more verbose.
Otherwise I think logging the error and exiting 1 is correct.
Please remove the comments

@dherault dherault merged commit a5d7b60 into dherault:master Jun 3, 2019
@dherault
Copy link
Owner

dherault commented Jun 3, 2019

v5.0.1

@dnalborczyk dnalborczyk deleted the regression branch June 3, 2019 12:41
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.

v5: "Serverless: Offline listening ..." missing from cli
2 participants