posit-dev / posit-dev/air

Avoid writing LSP Request errors twice to logs

Open
#99 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
446
Forks
32
Avg merge
16h 48m
Merged PRs (30d)
1

Description

Once is done by our logging system, another is done from the middleware when we return an error.

Rust-analyzer overrides handleFailedRequest to never show the notification to the user as a toast message. We could do this too if we wanted to. https://github.com/rust-lang/rust-analyzer/blob/f50969b23958323ac2094cc1c0fb5881345928f7/editors/code/src/lang_client.ts#L5

(Note that in general this specific case should not even be an LSP error, see #65, but still)

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the middleware path that returns an LSP Request error and the logging system that already records it. Compare the handling with rust-analyzer's handleFailedRequest reference, then verify that a failing request produces only one log entry and no duplicate middleware entry.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.