lenso-platform-core 0.1.15

Core runtime primitives for the Lenso backend framework.
Documentation
1
2
3
4
5
6
7
8
9
10
use platform_core::{AppError, ErrorCode};

#[test]
fn error_codes_are_machine_readable() {
    let error = AppError::new(ErrorCode::NotFound, "Resource not found");

    assert_eq!(error.code.as_str(), "not_found");
    assert_eq!(error.public_message, "Resource not found");
    assert!(!error.retryable);
}