app_error

Macro app_error 

Source
macro_rules! app_error {
    ($name:ident { $($variant:ident($ty:ty)),* $(,)? }) => { ... };
}
Expand description

Macro for creating app-specific error types that wrap HttpError

This makes it easy to create custom error types for your application while leveraging the existing HttpError infrastructure.

ยงExample

use lmrc_http_common::app_error;

app_error! {
    MyAppError {
        BusinessLogic(String),
        ExternalApi(String),
    }
}

// Now you can use MyAppError in your handlers:
// fn my_handler() -> Result<(), MyAppError> { ... }