fix(error): perf error

This commit is contained in:
2026-01-29 15:49:46 +08:00
parent 88868050ba
commit c5b32f721c
3 changed files with 206 additions and 45 deletions

View File

@@ -113,7 +113,7 @@ common-telemetry = { git = "ssh://git@gitea.shay7sev.site:2222/admin/common-tele
#### A. 初始化日志 (main.rs)
```rust
use common_lib::telemetry::{self, TelemetryConfig};
use common_telemetry::telemetry::{self, TelemetryConfig};
#[tokio::main]
async fn main() {
@@ -141,7 +141,7 @@ async fn main() {
```rust
use axum::{Json, response::IntoResponse};
use common_lib::AppError; // 引入统一错误
use common_telemetry::AppError; // 引入统一错误
async fn get_profile(token: String) -> Result<Json<UserProfile>, AppError> {
// 模拟Token 过期