Skip to content

Better frontend error handling #341

Description

@rogueg

Today, every component has to take care of catching its own errors and rendering ErrorDisplay. If you miss one, it can crash the page. This is a bit annoying for us, but especially bad for custom components.

It'd be nice to have a clean api for both built-in and custom components that could catch any type of error and display the message nicely.

Svelte is doing us no favors here. Having to write a try/catch in every single effect or derived is gross. It does have <svelte:boundary>, but crucially that only catches errors thrown in children, rather than the component itself.

Probably a few ways to solve this, but the one that stands out to me right now is to modify mdsvex so that every component gets transparently wrapped in some kind of that implements the boundary (and maybe other stuff, like query loading and load states?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions