sipp-rs 0.1.0

Unified Rust library for extensible Sipp inference
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::client::{EndpointError, SippError};

#[test]
fn gateway_endpoint_errors_remain_structured() {
    let mut endpoint = EndpointError::new("protocol", "invalid response");
    endpoint.status = Some(502);
    endpoint.code = Some("bad_upstream".to_string());
    let error = SippError::Endpoint(endpoint);
    assert_eq!(
        error.to_string(),
        "endpoint error (protocol): invalid response"
    );
}