pub enum LSPS5ProtocolError {
AppNameTooLong,
WebhookUrlTooLong,
UrlParse,
UnsupportedProtocol,
TooManyWebhooks,
AppNameNotFound,
UnknownError,
SerializationError,
SlowDownError,
NoPriorActivityError,
}Expand description
Protocol errors defined in the LSPS5/bLIP-55 specification.
These errors are sent over JSON-RPC when protocol-level validation fails and correspond directly to error codes defined in the LSPS5 specification. LSPs must use these errors when rejecting client requests.
Variants§
AppNameTooLong
App name exceeds the maximum allowed length of 64 bytes.
Sent when registering a webhook with an app name longer than MAX_APP_NAME_LENGTH.
WebhookUrlTooLong
Webhook URL exceeds the maximum allowed length of 1024 bytes.
Sent when registering a webhook with a URL longer than MAX_WEBHOOK_URL_LENGTH.
UrlParse
Webhook URL is not a valid URL.
Sent when the provided webhook URL cannot be parsed or is syntactically invalid.
UnsupportedProtocol
Webhook URL does not use HTTPS.
The LSPS5 specification requires all webhook URLs to use HTTPS.
TooManyWebhooks
Client has reached their maximum allowed number of webhooks.
AppNameNotFound
The specified app name was not found in the registered webhooks.
Sent when trying to update or remove a webhook that doesn’t exist.
UnknownError
An unspecified or unexpected error occurred.
SerializationError
Error during serialization of LSPS5 webhook notification.
SlowDownError
A notification was sent too frequently.
This error indicates that the LSP is sending notifications
too quickly, violating the notification cooldown NOTIFICATION_COOLDOWN_TIME
NoPriorActivityError
Request rejected because the client has no prior activity with the LSP (no open channel and no active LSPS1 or LSPS2 flow). The client should first open a channel or initiate an LSPS1/LSPS2 interaction before retrying.
Implementations§
Trait Implementations§
Source§impl Clone for LSPS5ProtocolError
impl Clone for LSPS5ProtocolError
Source§fn clone(&self) -> LSPS5ProtocolError
fn clone(&self) -> LSPS5ProtocolError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more