File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed 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;
3
3
pub ( crate ) mod bolt12_receive;
4
4
pub ( crate ) mod bolt12_send;
5
5
pub ( crate ) mod close_channel;
6
+ pub ( crate ) mod error;
6
7
pub ( crate ) mod get_node_info;
7
8
pub ( crate ) mod get_payment_details;
8
9
pub ( crate ) mod list_channels;
You can’t perform that action at this time.
0 commit comments