Skip to content

Improve combineErrors #3709

Closed
Closed
@joyfulmantis

Description

@joyfulmantis

Currently, combineErrors is pretty terrible. If we get more than one error, we return everything as an InternalError. However, error types have different meanings, and are handled differently depending on the error code by lsp clients. With the current combineErrors, the error code chosen by the plugin is completely ignored if more than one plugin has an error.

There is no easy fix here because we can only return one error. However, we can do things better. Some options would be to see if all the error codes match, and then return that error if so. Another option would be to have a priority of different error codes, so certain errors would be returned over others if we have both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..type: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions