CommentReport::report(conn, &report_form)
})
.await?
- .map_err(LemmyError::from)
- .map_err(|e| e.with_message("couldnt_create_report"))?;
+ .map_err(|e| LemmyError::from_error_message(e, "couldnt_create_report"))?;
let comment_report_view = blocking(context.pool(), move |conn| {
CommentReportView::read(conn, report.id, person_id)
blocking(context.pool(), resolve_fun)
.await?
- .map_err(LemmyError::from)
- .map_err(|e| e.with_message("couldnt_resolve_report"))?;
+ .map_err(|e| LemmyError::from_error_message(e, "couldnt_resolve_report"))?;
let report_id = data.report_id;
let comment_report_view = blocking(context.pool(), move |conn| {