Skip account ids that no longer exist in internal directories (closes #2352)
This commit is contained in:
@@ -11,7 +11,6 @@ use jmap_proto::request::capability::{
|
||||
};
|
||||
use std::future::Future;
|
||||
use std::sync::Arc;
|
||||
use trc::AddContext;
|
||||
use types::id::Id;
|
||||
use utils::map::vec_map::VecMap;
|
||||
|
||||
@@ -57,10 +56,16 @@ impl SessionHandler for Server {
|
||||
// Add secondary accounts
|
||||
for &account_id in access_token.secondary_ids() {
|
||||
let is_owner = access_token.is_member(account_id);
|
||||
let access_token = self
|
||||
.get_access_token(account_id)
|
||||
.await
|
||||
.caused_by(trc::location!())?;
|
||||
let access_token = match self.get_access_token(account_id).await {
|
||||
Ok(token) => token,
|
||||
Err(err) => {
|
||||
if err.matches(trc::EventType::Auth(trc::AuthEvent::Error)) {
|
||||
continue;
|
||||
} else {
|
||||
return Err(err.caused_by(trc::location!()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let account_id = Id::from(account_id);
|
||||
let mut account = Account {
|
||||
|
||||
Reference in New Issue
Block a user