feat(proxy): add error mapper for HTTP status code mapping

- Add error_mapper.rs module to map ProxyError to HTTP status codes
- Implement map_proxy_error_to_status() for error classification
- Implement get_error_message() for user-friendly error messages
- Support all error types: upstream, timeout, connection, provider failures
- Include comprehensive unit tests for all mappings
This commit is contained in:
YoVinchen
2025-12-14 16:02:04 +08:00
parent 395783e22a
commit 14bc8a00e5
2 changed files with 111 additions and 0 deletions
+1
View File
@@ -4,6 +4,7 @@
pub mod circuit_breaker;
pub mod error;
pub mod error_mapper;
mod forwarder;
mod handlers;
mod health;