fix(errors)!: forbid interpolated details in wire-facing internal errors

This commit is contained in:
CleverWild
2026-08-09 00:11:03 +02:00
parent 357726bc5d
commit e79fc055d4
11 changed files with 94 additions and 152 deletions

View File

@@ -23,6 +23,7 @@ use arbiter_proto::{
use chrono::DateTime;
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum AuthError {
#[error("Server sent invalid auth challenge")]
InvalidChallenge,

View File

@@ -17,6 +17,7 @@ use tokio_stream::wrappers::ReceiverStream;
use tonic::transport::ClientTlsConfig;
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum ArbiterClientError {
#[error("Authentication error")]
Authentication(#[from] AuthError),

View File

@@ -4,6 +4,7 @@ use arbiter_proto::home_path;
use std::path::{Path, PathBuf};
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum StorageError {
#[error("Invalid signing key length in storage: expected {expected} bytes, got {actual} bytes")]
InvalidKeyLength { expected: usize, actual: usize },

View File

@@ -11,6 +11,7 @@ pub fn next_request_id() -> i32 {
}
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum ClientSignError {
#[error("Transport channel closed")]
ChannelClosed,