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

Better display of Specberus errors #82

Open
marcoscaceres opened this issue Jun 8, 2021 · 1 comment
Open

Better display of Specberus errors #82

marcoscaceres opened this issue Jun 8, 2021 · 1 comment
Labels
enhancement Enhancement to an existing feature

Comments

@marcoscaceres
Copy link
Member

This is related to #3... or builds on it.

The current display of the error messages when Echidna can be a bit cryptic (specially when shown as json).

  Specberus Errors:
    Retrieved "previous" and "latest" documents, but their contents don't match.
      { name: 'headers.dl', section: 'front-matter', rule: 'docIDFormat' }

It would be nice to show the { ... } stuff in a more human friendly manner, and provide links to, for instance, "docIDFormat".

Also, we might want to replace the word "Specberus" for something more meaningful.

@sidvishnoi sidvishnoi added the enhancement Enhancement to an existing feature label Jun 8, 2021
@sidvishnoi
Copy link
Member

sidvishnoi commented Jun 8, 2021

Relevant code if someone wants to take this on:

specberus(errors) {
console.group("Specberus Errors:");
for (const error of errors) {
const { detailMessage } = error;
const { message, link } = error.extra || {};
const { key, type } = error;
console.group(detailMessage || message || key);
if (type) console.log(type);
if (link) console.log(link);
console.groupEnd();
}
console.groupEnd();
},

To mimic a run:

  1. Return a valid ID (e.g, "15a512ae-12d6-4031-ae69-1f2a075a1f9c") from publish without actually publishing.
  2. Run INPUTS_DEPLOY=true OUTPUTS_BUILD='{}' node src/deploy-w3c-echidna.js (assuming yarn dev is running in background)

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

No branches or pull requests

2 participants