fix: correct error message for unauthorized label access
All checks were successful
Frontend CI / build (push) Successful in 1m38s
PR Title Check / pr-title-check (pull_request) Successful in 16s

This commit is contained in:
SquidSpirit 2025-10-15 05:40:04 +08:00
parent e177814996
commit 72e944af7b

View File

@ -12,7 +12,7 @@ impl Display for LabelError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self { match self {
LabelError::NotFound => write!(f, "Label not found"), LabelError::NotFound => write!(f, "Label not found"),
LabelError::Unauthorized => write!(f, "Unauthorized access to post"), LabelError::Unauthorized => write!(f, "Unauthorized access to label"),
LabelError::DuplicatedLabelName => write!(f, "Label name already exists"), LabelError::DuplicatedLabelName => write!(f, "Label name already exists"),
LabelError::Unexpected(e) => write!(f, "Unexpected error: {}", e), LabelError::Unexpected(e) => write!(f, "Unexpected error: {}", e),
} }