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

Review misleading error messages #536

Open
tripu opened this issue Nov 16, 2016 · 5 comments
Open

Review misleading error messages #536

tripu opened this issue Nov 16, 2016 · 5 comments
Labels

Comments

@tripu
Copy link
Member

tripu commented Nov 16, 2016

In particular, those that are occurring lately because of the switch to HTTPS; we've had a few recently. Users don't notice that the error is a mere “s” missing (understandably), because the error messages are generic, and some times don't point to the corresponding publication rule, where the boilerplate is.

@tripu tripu added the UI label Nov 16, 2016
@plehegar
Copy link
Member

A complementary way to fix error messages is to move them out of the software and put them in GitHub or a wiki. Ie point people to a page describing the error and, as always, allow folks to contribute to those pages.
Today, going from
"specberus": {
"status": "failure",
"errors": [
{
"key": "this-latest-shortname",
"type": {
"name": "headers.dl",
"section": "front-matter",
"rule": "docIDFormat"
}
}
]
},

to

https://github.com/w3c/specberus/blob/master/lib/l10n-en_GB.js#L45

isn't user friendly.

@tripu
Copy link
Member Author

tripu commented Oct 16, 2017

I agree that the errors we have now in JSON aren't good. But I personally prefer descriptive error messages to be contained in the software itself.

I started working on this in w3c/echidna#431 already.

Errors will look more or less like this:

These changes are reformatting the errors in Echidna; but the same transformation I hope we can apply directly in Specberus.

@plehegar
Copy link
Member

again, we should be able to point to a page for further information, so that we can easiuly extend the documentation beyond simple sentence.

@tripu
Copy link
Member Author

tripu commented Oct 17, 2017

@plehegar, the rules on w3.org/pubrules/doc are sometimes several sentences long, and include examples and suggested boilerplate. eg, eg. Do you think that's still not enough?

@plehegar
Copy link
Member

plehegar commented Aug 7, 2018

there is no point from an error message to w3.org/pubrules/doc.

Here is an other example:
{ "key": "title",
"type": {
"name": "headers.h1-title",
"section": "front-matter",
"rule": "title" }
},

Basically, it's trying to tell me that <h1> text doesn't match <title>. It is reflected in The document's title must be in the title element and in an h1 element.. I had to look at the source code of the rule to understand that because the normalization doesn't like <br> elements in text content. At the minimum, we need to add a url in that JS object to point to http://www.w3.org/pubrules/doc/rules/?profile=CR#title. At best, http://www.w3.org/pubrules/doc/rules/?profile=CR#title should also point to https://github.com/w3c/specberus/blob/master/lib/rules/headers/h1-title.js .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants