Merge various `CouldntFindX` errors into one
Nutomic opened this issue · 0 comments
Nutomic commented
We have all sorts of separate error messages for NotFound
, such as these:
CouldntFindCommunity,
CouldntFindPerson,
CouldntFindComment,
CouldntFindCommentReport,
CouldntFindPostReport,
CouldntFindPrivateMessageReport,
CouldntFindLocalUser,
CouldntFindPersonMention,
CouldntFindRegistrationApplication,
CouldntFindCommentReply,
CouldntFindPrivateMessage,
CouldntFindActivity,
I dont think there is any reason for them, it would be enough to have a single NotFound
error. Particularly after #4617 which requires using these errors in a lot more places. That could be simplified by adding a method Option::to_err()
which turns it into NotFound
error, similar to the way LemmyErrorExt works.