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

runInBackground should return errors #1170

Closed
alecthomas opened this issue Apr 4, 2024 · 3 comments · Fixed by #1332
Closed

runInBackground should return errors #1170

alecthomas opened this issue Apr 4, 2024 · 3 comments · Fixed by #1332
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@alecthomas
Copy link
Collaborator

alecthomas commented Apr 4, 2024

Without doing this, it prints an error but then blocks for --startup-timeout before exiting with an error, rather than immediately exiting.

@alecthomas alecthomas added bug Something isn't working good first issue Good for newcomers labels Apr 4, 2024
@github-actions github-actions bot added the triage Issue needs triaging label Apr 4, 2024
@alecthomas alecthomas mentioned this issue Apr 4, 2024
@alecthomas alecthomas removed the triage Issue needs triaging label Apr 9, 2024
@deniseli deniseli self-assigned this Apr 24, 2024
@deniseli
Copy link
Contributor

@alecthomas could you recommend some steps to reproduce? I've tried running ftl serve --background in a second tab while there's another serve or dev running, and the failing ftl serve --background still finished quickly enough that I suspect I'm not understanding this issue correctly. Thanks :)

@alecthomas
Copy link
Collaborator Author

IIRC the function doesn't return errors, it logs them - it should return those errors.

@deniseli
Copy link
Contributor

Got it, thanks!

deniseli added a commit that referenced this issue 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!
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants