More error handling improvements
This commit is contained in:
@ -29,7 +29,7 @@ pub async fn set(
|
||||
let folder_info = db::folder::get_by_id(params.folder_id, &pool)
|
||||
.await
|
||||
.handle_internal("Error getting folder info")?
|
||||
.ok_or_else(GeneralError::item_not_found)?;
|
||||
.item_not_found()?;
|
||||
if folder_info.owner_id == params.user_id {
|
||||
return Err(GeneralError::message(
|
||||
StatusCode::BAD_REQUEST,
|
||||
|
Reference in New Issue
Block a user