Closed
Description
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.