mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <wpfleger@block.xyz> Signed-off-by: Will Pfleger <wpfleger@squareup.com> Signed-off-by: Will Pfleger <wpfleger96@gmail.com> Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub1fgdl5qqnh3k3f2xkqrvt7cujalhm623x4s7fdjdj5yrtp5fzjl9qrjpucw <4a1bfa0013bc6d14a8d600d8bf6392efefbd2a26ac3c96c9b2a106b0d12297ca@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub16v54tttfqacx9ycvc3k0ut0npj564ahcuajzy6qjvh57ntmsf4uq4806j2 <d32955ad69077062930cc46cfe2df30ca9aaf6f8e76422681265e9e9af704d78@sprout-oss.stage.blox.sqprod.co> Co-authored-by: Will Pfleger <wpfleger96@gmail.com>
50 lines
1.4 KiB
Rust
50 lines
1.4 KiB
Rust
use thiserror::Error;
|
|
|
|
/// Errors returned by the proxy layer.
|
|
#[derive(Debug, Error)]
|
|
pub enum ProxyError {
|
|
/// The invite token was not found in the store.
|
|
#[error("invite token not found")]
|
|
InviteNotFound,
|
|
|
|
/// The invite token has passed its expiry time.
|
|
#[error("invite token expired")]
|
|
InviteExpired,
|
|
|
|
/// The invite token has reached its maximum use count.
|
|
#[error("invite token exhausted")]
|
|
InviteExhausted,
|
|
|
|
/// The supplied external public key is not a valid 32-byte hex string.
|
|
#[error("invalid external pubkey: {0}")]
|
|
InvalidPubkey(String),
|
|
|
|
/// Shadow key derivation failed.
|
|
#[error("shadow key derivation failed: {0}")]
|
|
KeyDerivation(String),
|
|
|
|
/// An I/O or network error occurred.
|
|
#[error("io error: {0}")]
|
|
Io(#[from] std::io::Error),
|
|
|
|
/// The upstream relay connection failed.
|
|
#[error("upstream error: {0}")]
|
|
Upstream(String),
|
|
|
|
/// Authentication failed.
|
|
#[error("auth error: {0}")]
|
|
Auth(String),
|
|
|
|
/// JSON serialization/deserialization failed.
|
|
#[error("serialization error: {0}")]
|
|
Serialization(#[from] serde_json::Error),
|
|
|
|
/// The client does not have permission for this operation.
|
|
#[error("permission denied: {0}")]
|
|
PermissionDenied(String),
|
|
|
|
/// The requested channel was not found.
|
|
#[error("channel not found: {0}")]
|
|
ChannelNotFound(String),
|
|
}
|