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: runInBackground returns error #1332

Merged
merged 1 commit into from
Apr 25, 2024
Merged

fix: runInBackground returns error #1332

merged 1 commit into from
Apr 25, 2024

Conversation

deniseli
Copy link
Contributor

@deniseli deniseli commented Apr 25, 2024

Fixes #1170

The new terminal output, when I force an error to return from runInBackground, looks like:

$ build/release/ftl serve --background
ftl: error: mock error!

@deniseli deniseli requested a review from a team as a code owner April 25, 2024 17:48
@deniseli deniseli requested review from worstell and removed request for a team April 25, 2024 17:48
@alecthomas alecthomas mentioned this pull request Apr 25, 2024
@@ -55,7 +55,10 @@ func (s *serveCmd) Run(ctx context.Context) error {
_ = KillBackgroundServe(logger)
}

runInBackground(logger)
if err := runInBackground(logger); err != nil {
logger.Errorf(err, "runInBackground failed")
Copy link
Collaborator

Choose a reason for hiding this comment

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

You might be able to remove the log message since the cmd will error as well. Otherwise, I think we might get duplicate error messages like this:
Screenshot 2024-04-25 at 10 57 11 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@deniseli deniseli force-pushed the dli/serve-bg-errs branch from 04eb5cb to 5bd3b48 Compare April 25, 2024 18:11
@deniseli deniseli merged commit 866e079 into main Apr 25, 2024
11 checks passed
@deniseli deniseli deleted the dli/serve-bg-errs branch April 25, 2024 18:21
Copy link
Collaborator

@alecthomas alecthomas left a comment

Choose a reason for hiding this comment

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

Nice

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.

runInBackground should return errors
3 participants