Should we model compilation errors as JSON-RPC errors?
See original GitHub issue@jvican how compile errors in a CompileResult
should be communicated.
In the current implementation, a CompileResult
contains no specific information as to compile errors, but by being a successful result it signals that the overall compilation succeded. In the case of any error, a JsonRpc error result is returned. Individual per-target CompileReport
notifications communicate the results during compilation.
The argument for this mechanic is that a client can assume a successful result allows to resume normally with dependent tasks.
The argument against is that compile errors are a part of normal operation of the compiler, and only internal errors should trigger exception handling.
To be discussed for bsp 2.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
What Standard RPC Errors Should I Handle?
Is there documentation that lists ALL the types of web3 exceptions that can be thrown by an RPC endpoint? eg. gas price too...
Read more >8 Tips for Solving The JSON RPC Error In Metamask
In this article, we are sharing 5 best practices and 8 possible solutions that can help you solve the internal JSON 32603. Before...
Read more >JSON-RPC 2.0 Specification
1 Overview. JSON-RPC is a stateless, light-weight remote procedure call (RPC) protocol. Primarily this specification defines several data structures and the ...
Read more >JSONRPC format different between Jsonrpc4j and go's rpc ...
The problem is jsonrpc4j is when error happen, golang`s method will return error and encoding to json. I got this json object in...
Read more >NPM packages for vscode-jsonrpc and vscode ... - GitHub
Compile using tsc -p . Produces no errors for me. @felixfbecker can you please provide a setup in which this result in compile...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I recommend using JSON-RPC errors only for 1) error handling at the JSON-RPC layer and 2) internal server error. Application-level errors like “compilation failed” should be encoded in the protocol messages.
Yeah, which are JSON-RPC errors.
I also think that we should perhaps move valid errors like compilation failed to the BSP layer instead of JSON-RPC in BSP 2.0. That will be conceptually simpler.