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

Possible improvement to error logging in the console #633

Open
jwthomson opened this issue Oct 11, 2024 · 2 comments
Open

Possible improvement to error logging in the console #633

jwthomson opened this issue Oct 11, 2024 · 2 comments

Comments

@jwthomson
Copy link
Contributor

jwthomson commented Oct 11, 2024

Recently an issue was raised in the SAFE Dojo repo which was ultimately as the result of an error message being a bit buried.

Link: CompositionalIT/SAFE-Dojo#185

The error message in question:
image

Here the issue is with the server but Vite's errors sort of "steal the show" and turn attention to the client, which is misleading. This is particularly bad for people new to the SAFE stack since they are still trying to get to grips with everything. Is there anything we could do to make errors like this clearer?

@amirrezapanahi
Copy link

amirrezapanahi commented Oct 25, 2024

I would say to emphasise that message as a "warning". perhaps colour code it in yellow to distinguish it from the rest of the logs and make it easier to spot.

Red would be misleading as it suggests that the system panicked but it hasn't in this case

@mattgallagher92
Copy link
Member

Some options:

  • Preempt this by explicitly checking whether the port is available before the server is launched, and logging a warning if it's not.
  • Not necessarily a good idea, but we could hook into the font coloring in Helpers.fs.
  • Make use of Spectre.Console?

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

3 participants