mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
feat(rpc): add startup health-check and propagate server errors
Rpc.start() now calls get_system_info() after launching the server to verify it started successfully. If the server exits early (e.g. due to an invalid accounts directory), the core error message from stderr is captured and included in the raised JsonRpcError. The reader_loop now unblocks pending RPC requests when the server closes stdout, so callers never hang on a dead server. Export JsonRpcError from the deltachat_rpc_client package. Add test_early_failure verifying that Rpc.start() raises with the actual core error message for invalid accounts directories.
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
RPC client connects to standalone Delta Chat RPC server `deltachat-rpc-server`
|
||||
and provides asynchronous interface to it.
|
||||
`rpc.start()` performs a health-check RPC call to verify the server
|
||||
started successfully and will raise an error if startup fails
|
||||
(e.g. if the accounts directory could not be used).
|
||||
|
||||
## Getting started
|
||||
|
||||
|
||||
Reference in New Issue
Block a user