Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

350 B
Raw Blame
use axum::{
    body::Body,
    http::{Response, StatusCode},
};

use model::response::GenericResponse;

/// Generic wrapper for error responses in middleware
pub fn error_handler(message: &str, status_code: StatusCode) -> Response<Body> {
    GenericResponse::builder()
        .is_error(true)
        .message(message)
        .send(status_code)
}