calva
calva copied to clipboard
Refactor lsp getServerInfo function to avoid potential null error
I'm making this as a reminder to address this: https://github.com/BetterThanTomorrow/calva/pull/1602/files#r830554919. I don't have time to address it right now, but an issue is better than nothing 😄 . @corasaurus-hex did verify that it is an issue (not that it has caused a problem yet, necessarily, but it could).
Seems to be a simple fix - just re-throw the exception and maybe add a try catch to one call site that checks if the return is truthy.
we have just the function for that https://github.com/BetterThanTomorrow/calva/blob/5e780daa4ba6083eb75817c094ca68019a00dfbb/src/utilities.ts#L30-L39 🥳