fix: RPC error message
This commit is contained in:
parent
367b0fc80f
commit
d649fc9159
1 changed files with 6 additions and 3 deletions
|
|
@ -41,10 +41,13 @@ private unsafe def handleRpcCallUnsafe (p : Lsp.RpcCallParams) : RequestM (Reque
|
|||
let proc : Except _ _ := Lean.Environment.evalConstCheck RpcProcedure snap.env options ``RpcProcedure procName
|
||||
match proc with
|
||||
| Except.ok x => x.wrapper p.sessionId p.params
|
||||
| Except.error e => throwThe RequestError { code := JsonRpc.ErrorCode.methodNotFound, message := "asdf" }
|
||||
| Except.error e => throwThe RequestError {
|
||||
code := JsonRpc.ErrorCode.internalError
|
||||
message := s!"Failed to evaluate RPC constant '{procName}': {e}" }
|
||||
else
|
||||
throwThe RequestError { code := JsonRpc.ErrorCode.methodNotFound
|
||||
message := s!"No RPC method '{p.method}' bound" }
|
||||
throwThe RequestError {
|
||||
code := JsonRpc.ErrorCode.methodNotFound
|
||||
message := s!"No RPC method '{p.method}' bound" }
|
||||
|
||||
@[implementedBy handleRpcCallUnsafe]
|
||||
private constant handleRpcCall (p : Lsp.RpcCallParams) : RequestM (RequestTask Json)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue