pa11y / pa11y-ci

Pa11y CI is a CI-centric accessibility test runner, built using Pa11y
https://pa11y.org
GNU Lesser General Public License v3.0
508 stars 62 forks source link

Bug: Reporter error handling #171

Open aarongoldenthal opened 2 years ago

aarongoldenthal commented 2 years ago

There is no specific handling for errors thrown by a reporter. This can lead to varying and undesirable results depending on the reporter event.

Propose updating cycleReporters with error handling to cover all events and return false on reporter failure as it does when there is no reporter function (although it could log something to stderr as well). If pa11y-ci had more exhaustive debug logging as an option like pa11y, this seems like a good candidate.

In addition, the Promise.all() in cycleReporters could be replaced with Promise.allSettled() since Promise.all() will reject on the first rejection, versus allowing all to execute with Promise.allSettled(). This is supported as of Node 12.9.0, which would require a breaking engine update.

joeyciechanowicz commented 2 years ago

Propose updating cycleReporters with error handling to cover all events and return false on reporter failure

Good idea. Definitely want to log to stderr when a reporter method fails IMO.

Regarding updating the minimum engine to 12.9, I think that would be fine. We support all the Node LTS releases, however when Node states that 12 is an LTS, that doesn't mean 12.0 will always be working, rather the latest 12.x release will be kept in a fixed state.

aarongoldenthal commented 2 years ago

@joeyciechanowicz I agree on the Node 12 philosophy, more a note that currently "engines": { "node": ">=12" }, so I assume we'd want to update that to be clear on the dependency.