Compare commits

..

No commits in common. "be423aabb6d903c3ce714a952d55376e60731e2b" and "845aba443b4433d67f83fd408858f580b4dd90eb" have entirely different histories.

2 changed files with 9 additions and 33 deletions

2
lib.rs
View File

@ -1 +1 @@
// Frontend embedding is handled by libs/frontend crate. ci // Frontend embedding is handled by libs/frontend crate.

View File

@ -196,38 +196,14 @@ impl AppError {
AppError::NotFound(s) => s.clone(), AppError::NotFound(s) => s.clone(),
AppError::BadRequest(s) => s.clone(), AppError::BadRequest(s) => s.clone(),
AppError::Forbidden(s) => s.clone(), AppError::Forbidden(s) => s.clone(),
AppError::DatabaseError(s) => { AppError::DatabaseError(_) => "A database error occurred".to_string(),
println!("[System] {:?}", s); AppError::PasswordHashError(_) => "A password processing error occurred".to_string(),
"A database error occurred".to_string() AppError::GitError(_) => "A git operation failed".to_string(),
} AppError::SerdeError(_) => "A data parsing error occurred".to_string(),
AppError::PasswordHashError(s) => { AppError::Io(_) => "A file system error occurred".to_string(),
println!("[System] {:?}", s); AppError::InternalServerError(_) => "An internal error occurred".to_string(),
"A password processing error occurred".to_string() AppError::AvatarUploadError(_) => "An avatar upload error occurred".to_string(),
} AppError::Conflict(_) => "Resource conflict".to_string(),
AppError::GitError(s) => {
println!("[System] {:?}", s);
"A git error occurred".to_string()
}
AppError::SerdeError(s) => {
println!("[System] {:?}", s);
"A data parsing error occurred".to_string()
}
AppError::Io(s) => {
println!("[System] {:?}", s);
"A file system error occurred".to_string()
}
AppError::InternalServerError(e) => {
println!("[System] {:?}", e);
"An internal server error occurred".to_string()
}
AppError::AvatarUploadError(s) => {
println!("[System] {:?}", s);
"An avatar upload error occurred".to_string()
}
AppError::Conflict(s) => {
println!("[System] {:?}", s);
"Resource conflict".to_string()
}
_ => self.slug().to_string(), _ => self.slug().to_string(),
} }
} }