miroir/crates/miroir-proxy/src/error.rs
jedarden fca081e1bd Integrate MeilisearchError into proxy (IntoResponse, auth middleware) + telemetry
- Add axum feature flag to miroir-core with IntoResponse impl for MeilisearchError
- Refactor auth middleware to use MeilisearchError::new() + MiroirCode instead of
  manual JSON construction, ensuring consistent error shape across all auth errors
- Add proxy error.rs re-export alias for ApiError
- Implement full telemetry middleware with Prometheus metrics (request duration,
  in-flight gauge, scatter counters, node health)
- Reorder middleware layers: auth before telemetry so 401s are also instrumented

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 05:21:09 -04:00

4 lines
201 B
Rust

//! Proxy error types — thin wrappers around miroir-core error infrastructure.
/// Alias so internal modules can write `ApiError::new(code, msg)`.
pub use miroir_core::MeilisearchError as ApiError;