Skip to content
Clone

chore(issues): refresh issues crate manifest and error

zhenyi committed
parent f2ad9b8 commit 9c6a713 Browse files

1 file changed

+16 −0

Modified lib/issues/error.rs View lib/issues/error.rs
@@ -76,6 +76,22 @@
7676 | IssueError::RateLimited(_)
7777 )
7878 }
79
80 /// Bounded label for metrics. Keep stable and low-cardinality.
81 pub fn error_kind(&self) -> &'static str {
82 match self {
83 IssueError::BadRequest(_) => "bad_request",
84 IssueError::Unauthorized(_) => "unauthorized",
85 IssueError::Forbidden(_) => "forbidden",
86 IssueError::NotFound(_) => "not_found",
87 IssueError::Conflict(_) => "conflict",
88 IssueError::Unprocessable(_) => "unprocessable",
89 IssueError::RateLimited(_) => "rate_limited",
90 IssueError::Internal(_) => "internal_other",
91 IssueError::Sqlx(_) => "internal_db",
92 IssueError::Uuid(_) => "internal_uuid",
93 }
94 }
7995}
8096
8197impl IntoResponse for IssueError {