Improve some error descriptions

This commit is contained in:
silverpill 2023-01-29 19:57:17 +00:00
parent 6f38eba80e
commit f55431f8b8
3 changed files with 6 additions and 2 deletions

View file

@ -230,7 +230,10 @@ impl Actor {
};
},
_ => {
log_error(attachment, ValidationError("unsupported type"));
log_error(
attachment,
ValidationError("unsupported attachment type"),
);
},
};
};

View file

@ -79,6 +79,7 @@ pub async fn handle_announce(
log::warn!("repost already exists: {}", repost_object_id);
Ok(None)
},
// May return "post not found" error if post if not public
Err(other_error) => Err(other_error.into()),
}
}

View file

@ -176,7 +176,7 @@ pub async fn handle_note(
},
other_type => {
log::warn!("discarding object of type {}", other_type);
return Err(ValidationError("unsupported type").into());
return Err(ValidationError("unsupported object type").into());
},
};