fix: return error when trying to unregister unknown appservice id
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -143,7 +143,8 @@ impl Service {
|
||||
.registration_info
|
||||
.write()
|
||||
.await
|
||||
.remove(service_name);
|
||||
.remove(service_name)
|
||||
.ok_or_else(|| crate::Error::AdminCommand("Appservice not found"))?;
|
||||
|
||||
self.db.unregister_appservice(service_name)
|
||||
}
|
||||
|
||||
@@ -76,6 +76,8 @@ pub enum Error {
|
||||
RedactionError(OwnedServerName, ruma::canonical_json::RedactionError),
|
||||
#[error("{0} in {1}")]
|
||||
InconsistentRoomState(&'static str, ruma::OwnedRoomId),
|
||||
#[error("{0}")]
|
||||
AdminCommand(&'static str),
|
||||
}
|
||||
|
||||
impl Error {
|
||||
|
||||
Reference in New Issue
Block a user