mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 01:53:02 +02:00
Macroize various remaining Error constructions.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
21bbee8e3c
commit
667afedd24
9 changed files with 78 additions and 125 deletions
|
@ -1,7 +1,7 @@
|
|||
use axum::extract::State;
|
||||
use conduwuit::{Error, Result};
|
||||
use conduwuit::{Err, Result};
|
||||
use futures::StreamExt;
|
||||
use ruma::api::client::{error::ErrorKind, room::aliases};
|
||||
use ruma::api::client::room::aliases;
|
||||
|
||||
use crate::Ruma;
|
||||
|
||||
|
@ -23,10 +23,7 @@ pub(crate) async fn get_room_aliases_route(
|
|||
.user_can_see_state_events(sender_user, &body.room_id)
|
||||
.await
|
||||
{
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::forbidden(),
|
||||
"You don't have permission to view this room.",
|
||||
));
|
||||
return Err!(Request(Forbidden("You don't have permission to view this room.",)));
|
||||
}
|
||||
|
||||
Ok(aliases::v3::Response {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue