Improved error handling (part 1)

This commit is contained in:
mdecimus
2024-07-11 18:44:51 +02:00
parent ea77a98260
commit 0c2a3f09fe
179 changed files with 3409 additions and 3048 deletions

View File

@@ -113,7 +113,7 @@ impl JMAP {
access_token: &AccessToken,
next_call: &mut Option<Call<RequestMethod>>,
instance: &Arc<ServerInstance>,
) -> Result<ResponseMethod, MethodError> {
) -> trc::Result<ResponseMethod> {
Ok(match method {
RequestMethod::Get(mut req) => match req.take_arguments() {
get::RequestArguments::Email(arguments) => {
@@ -162,7 +162,8 @@ impl JMAP {
} else {
return Err(MethodError::Forbidden(
"Principal lookups are disabled".to_string(),
));
)
.into());
}
}
get::RequestArguments::Quota => {
@@ -209,7 +210,8 @@ impl JMAP {
} else {
return Err(MethodError::Forbidden(
"Principal lookups are disabled".to_string(),
));
)
.into());
}
}
query::RequestArguments::Quota => {