nim-json-rpc/json_rpc/errors.nim
Jacek Sieka 4eb39203eb
fixes (#95)
* fixes

* fix https://github.com/status-im/nimbus-eth2/issues/1650
* only one of `result` and `error` allowed in response
* fix invalid `string` instances being created from byte sequences
* fix large int64 parsing on 32-bit
* fix exception inheritance
* fix some dangling results
* some cleanups

* annotate exception issues, fix cancellation

* more error handling cleanup

* add rudimentary error tests

* cleanups

* simplify init
* use nextId -> lastId to avoid =1 init
* remove obsolete tests
2021-02-15 13:45:51 +01:00

13 lines
402 B
Nim

type
JsonRpcError* = object of CatchableError
## Base type of all nim-json-rpc errors
ErrorResponse* = object of JsonRpcError
## raised when the server responded with an error
InvalidResponse* = object of JsonRpcError
## raised when the server response violates the JSON-RPC protocol
RpcBindError* = object of JsonRpcError
RpcAddressUnresolvableError* = object of JsonRpcError