question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

There have been some comments around error boundaries & general feedback to devs when errors occur.

Here is an example of a plugin with broken code.

module.exports = {
    name: 'netlify-plugin-one',
    onInit: () => {
      console.log(thing.what) // undefined ref
    },
}

or

module.exports = {
    name: 'netlify-plugin-one',
    onInit: () => {
      throw new Error('http://www.nooooooooooooooo.com/')
    },
}

Currently errors materialize like so:

image

image

Are there ways we can improve upon this?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (18 by maintainers)

github_iconTop GitHub Comments

5reactions
lesliecdubscommented, Jan 21, 2020

Chiming in to +1 these suggestions! I think it’s imperative we more clearly surface these errors both in the logs and the UI to avoid user confusion and churn, like @jlengstorf said:

new customers may not get that far — they might just contact support and/or churn because “Netlify isn’t stable”

Could we get this work prioritized as part of the #project-build-plugins-ui scope?

Once we know how this is going to work on the backend, it’d be super helpful to get an issue opened in https://github.com/netlify/netlify-react-ui/issues so we can send the UI work through our typical process: design can take these suggestions and formalize a solution, then we can send it into frontend implementation (@drewm will lead that work), Copy Club, etc. 🙂

3reactions
jlengstorfcommented, Apr 21, 2020

all makes sense, and I’m on board. A couple wishlist items that I’d really like to see in place to avoid frustration/confusion later on:

1. Make it one-click to remove and rebuild when a plugin fails

  • messaging makes it clear when plugins cause a failure, and which plugin caused the failure
  • enable/disable provides a quick way to get your builds going again

this makes sense, and I’ll make a request since it sounds like we’re already building all of this functionality:

could we make the uncaught error message say something like this?

There was an unexpected error in the plugin
`netlify-plugin-dont-touch-my-garbage`. As a
precaution, the build was stopped and nothing
was deployed.

BUTTON: **Disable this plugin and rebuild.**

clicking the button would both turn off the build plugin and restart the deploy

2. Log unexpected failures so we can identity broken plugins/opportunities to coach plugin devs

utils.build.failPlugin allows plugin authors to explicitly signal that the build can continue safely even if their plugin fails unexpectedly - we can also shout about this in the plugin authoring docs to encourage it when possible

can we make sure we’re logging the failures in an analyzable way? this would help us flag and remove plugins that are outright broken, and gives us potential to provide actionable feedback to developers (your plugin has X unexpected failures with the message “Y” — consider using utils.build.failPlugin to avoid these failures)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I clear the message 'Size Error DX'? - Brother
How do I clear the message 'Size Error DX'? · 1. Press the CANCEL key to cancel the document. · 2. Choose a...
Read more >
feat(nuxt): improve error dx for users by danielroe ... - GitHub
Description · fixes an issue where users who manually throw 404s can't escape from the error page (by clearing error after navigating to...
Read more >
Recommendations for using the Revised Safer Dx ... - PubMed
The instrument can help users identify potential diagnostic errors in a standardized way for further analysis and safety improvement efforts as ...
Read more >
Society to Improve Diagnosis in Medicine
SIDM catalyzes and leads change to improve diagnosis and eliminate harm from diagnostic error, in partnership with patients, their families, the healthcare ...
Read more >
Developing the Safer Dx Checklist of Ten Safety ...
Background. Most health care organizations (HCOs) find diagnostic errors hard to address. The research team developed a checklist (the Safer Dx Checklist) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found