Skip to content

Improve handling of errors from Phoenix adaptation #1797

@cartermak

Description

@cartermak

Checked for duplicates

No - I haven't checked

Alternatives considered

No - I haven't considered

Related problems

After discussing with @duranb with respect to #1782 , we agreed that the precedent for error reporting from issues in a Phoenix adaptation is poor.

Describe the feature request

Any time we access a property from the adaptation or evaluate something using the adaptation (e.g., codemirror view dispatches, converting sequences), we should wrap the call in a try/catch that will provide more useful feedback to the user. Generally, we should avoid quiet errors or falling back to default implementations because this could cause command errors for users who don't realize something is broken.

Specifically, the error handling should at a minimum call showFailureToast with an error message implicating the adaptation, and ideally (when implemented) push the full exception to the custom UI error console for debugging.

Also, look for how to incorporate our own custom handler to do the same via the codemirror exceptionSink feature so that we can route errors that surface when, e.g., running custom linters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions