File tree Expand file tree Collapse file tree
ldk-server/server/src/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ pub ( crate ) struct LdkServerError {
2+ // The error message containing a generic description of the error condition in English.
3+ // It is intended for a human audience only and should not be parsed to extract any information
4+ // programmatically. Client-side code may use it for logging only.
5+ pub ( crate ) message : String ,
6+
7+ // The error code uniquely identifying an error condition.
8+ // It is meant to be read and understood programmatically by code that detects/handles errors by
9+ // type.
10+ pub ( crate ) error_code : LdkServerErrorCode ,
11+ }
12+
13+ pub ( crate ) enum LdkServerErrorCode {
14+ /// Please refer to [`protos::error::ErrorCode::InvalidRequestError`].
15+ InvalidRequestError ,
16+
17+ /// Please refer to [`protos::error::ErrorCode::AuthError`].
18+ AuthError ,
19+
20+ /// Please refer to [`protos::error::ErrorCode::LightningError`].
21+ LightningError ,
22+
23+ /// Please refer to [`protos::error::ErrorCode::InternalServerError`].
24+ InternalServerError ,
25+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ pub(crate) mod bolt11_send;
33pub ( crate ) mod bolt12_receive;
44pub ( crate ) mod bolt12_send;
55pub ( crate ) mod close_channel;
6+ pub ( crate ) mod error;
67pub ( crate ) mod get_node_info;
78pub ( crate ) mod get_payment_details;
89pub ( crate ) mod list_channels;
You can’t perform that action at this time.
0 commit comments