Skip to content

Commit

Permalink
refactor(utils/error): use uuid v7 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa authored Sep 28, 2024
1 parent f552794 commit 57752c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/utils/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl AppError {
Self {
error,
error_details,
error_id: Uuid::new_v4(),
error_id: Uuid::now_v7(),
status: status.unwrap_or(StatusCode::INTERNAL_SERVER_ERROR),
context: SpanTrace::capture(),
}
Expand All @@ -43,7 +43,7 @@ impl AppError {
Self {
error: format!("Unable to find {kind} named {name}"),
error_details: None,
error_id: Uuid::new_v4(),
error_id: Uuid::now_v7(),
status: StatusCode::NOT_FOUND,
context: SpanTrace::capture(),
}
Expand Down

0 comments on commit 57752c8

Please sign in to comment.