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

commands: Show server error info in browser #5286

Merged
merged 1 commit into from
Oct 16, 2018
Merged

Conversation

bep
Copy link
Member

@bep bep commented Oct 4, 2018

Fixes #5284

@bep
Copy link
Member Author

bep commented Oct 4, 2018

image

The current set of information elements on the error page:

  • Error title
  • Error message
  • Error stack trace
  • Hugo version string

Oh, and that is not it is supposed to look ...

@bep bep force-pushed the server-error branch 6 times, most recently from 7aead85 to 6c68e67 Compare October 5, 2018 16:23
@bep
Copy link
Member Author

bep commented Oct 5, 2018

image

Some more informational elements to put in there, but I think this will be mighty useful. (and yes, I see the typo).

@bep bep force-pushed the server-error branch 7 times, most recently from 6a566c4 to 49da30a Compare October 6, 2018 17:08
@@ -83,7 +83,7 @@ func New(fs *hugofs.Fs, cfg config.Provider) (*Paths, error) {
baseURL, err := newBaseURLFromString(baseURLstr)

if err != nil {
return nil, fmt.Errorf("Failed to create baseURL from %q: %s", baseURLstr, err)
return nil, fmt.Errorf("cailed to create baseURL from %q: %s", baseURLstr, err)
Copy link

Choose a reason for hiding this comment

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

Typo?

@bep bep force-pushed the server-error branch 8 times, most recently from 4b760aa to 4faa092 Compare October 9, 2018 10:57
@bep
Copy link
Member Author

bep commented Oct 9, 2018

image

@bep bep force-pushed the server-error branch 5 times, most recently from e70fd3c to d64b483 Compare October 10, 2018 10:16
@bep bep force-pushed the server-error branch 7 times, most recently from 5f0d6df to 177b4b1 Compare October 15, 2018 17:59
@bep bep force-pushed the server-error branch 5 times, most recently from 144e9cf to 09ca1d2 Compare October 16, 2018 18:20
@bep bep changed the title Work In Progress: commands: Show server error info in browser commands: Show server error info in browser Oct 16, 2018
@bep bep force-pushed the server-error branch 3 times, most recently from 3f3bf7c to 8a887ab Compare October 16, 2018 20:10
The main item in this commit is showing of errors with a file context when running `hugo server`.

This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`).

But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files.

Fixes gohugoio#5284
Fixes gohugoio#5290
See gohugoio#5325
See gohugoio#5324
@bep bep merged commit 35fbfb1 into gohugoio:master Oct 16, 2018
@github-actions
Copy link

github-actions bot commented Feb 1, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show server build error in browser
2 participants