jmap: fix two error messages

async
Manos Pitsidianakis 2020-03-28 11:43:32 +02:00
parent c77af98b26
commit 8eca8b34ed
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
2 changed files with 3 additions and 4 deletions

View File

@ -236,7 +236,7 @@ impl MailBackend for JmapType {
_sender: RefreshEventConsumer,
_work_context: WorkContext,
) -> Result<std::thread::ThreadId> {
Err(MeliError::from("sadfsa"))
Err(MeliError::from("JMAP watch for updates is unimplemented"))
}
fn mailboxes(&self) -> Result<FnvHashMap<MailboxHash, Mailbox>> {

View File

@ -72,11 +72,10 @@ impl JmapConnection {
let res_text = req.text()?;
let session: JmapSession = serde_json::from_str(&res_text).map_err(|_| {
let err = MeliError::new(format!("Could not connect to JMAP server endpoint for {}. Is your server hostname setting correct? (i.e. \"jmap.mailserver.org\") (Note: only session resource discovery via /.well-known/jmap is supported. DNS SRV records are not suppported.)", &server_conf.server_hostname));
let err = MeliError::new(format!("Could not connect to JMAP server endpoint for {}. Is your server hostname setting correct? (i.e. \"jmap.mailserver.org\") (Note: only session resource discovery via /.well-known/jmap is supported. DNS SRV records are not suppported.)\nReply from server: {}", &server_conf.server_hostname, &res_text));
*online_status.lock().unwrap() = (Instant::now(), Err(err.clone()));
err
}
)?;
})?;
if !session
.capabilities
.contains_key("urn:ietf:params:jmap:core")