palisade-errors 2.0.0

Security-conscious error handling with operational security principles
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use palisade_errors::AgentError;
use std::time::{Duration, Instant};

fn main() {
    let started = Instant::now();
    let err = AgentError::new(
        103,
        "Invalid credentials",
        "username lookup failed during authentication flow",
        "alice@example.invalid",
    )
    .with_timing_normalization(Duration::from_millis(25));

    println!("{err}");
    println!("elapsed: {:?}", started.elapsed());
}