-
Notifications
You must be signed in to change notification settings - Fork 984
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
More friendly PageFrontMatter deserialize error messages #1313
Labels
Comments
Hmm it shouldn't be a panic but we're depending on toml-rs error handling there. |
The panic is fixed but the error message I'm not too sure. |
I think that will be good enough for now :) |
I just see this library. It seems related to friendly error messages. |
Oooh that's nice. It seems a bit early to use it but it's promising |
agree, that's wait and see :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Environment
Zola version: 0.13.0
Expected Behavior
With some bad metdata for the page, we will get panic messages when doing deserialize for PageFrontMatter. The messages are kind of helpful but not in a way that's friendly.
It will be great to have some suggestion like the Rust compiler has.
Like:
This might be a fair amount of work, but I think friendly error messages is valuable. It will be good to in the roadmap.
Current Behavior
For example, the
draft
field should be bool, but if you somehow have typo that havingdraft = ture
in the file. Then you will get messages like:It does tell which file has the problem, but the error messages say
UnquotedString
.Step to reproduce
draft = ture
instead ofdraft = true
to a pageStill wanna say thank you, I enjoy using Zola :)
The text was updated successfully, but these errors were encountered: