mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
Caldav: improve HttpNotFound message
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1289 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
f8eb0adda7
commit
5dba7b1cd4
@ -1216,14 +1216,14 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
try {
|
||||
responses = DavGatewayHttpClientFacade.executePropFindMethod(httpClient, URIUtil.encodePath(itemPath), 0, EVENT_REQUEST_PROPERTIES_NAME_SET);
|
||||
if (responses.length == 0) {
|
||||
throw new HttpNotFoundException(itemPath);
|
||||
throw new HttpNotFoundException(itemPath+" not found");
|
||||
}
|
||||
} catch (HttpNotFoundException e) {
|
||||
LOGGER.debug(itemPath +" not found, searching by urlcompname");
|
||||
// failover: try to get event by displayname
|
||||
responses = searchItems(folderPath, EVENT_REQUEST_PROPERTIES, equals("urlcompname", emlItemName), FolderQueryTraversal.Shallow);
|
||||
if (responses.length == 0) {
|
||||
throw new HttpNotFoundException(itemPath);
|
||||
throw new HttpNotFoundException(itemPath+" not found");
|
||||
}
|
||||
}
|
||||
// build item
|
||||
@ -1234,7 +1234,7 @@ public class DavExchangeSession extends ExchangeSession {
|
||||
List<ExchangeSession.Contact> contacts = searchContacts(folderPath, CONTACT_ATTRIBUTES, equals("urlcompname", urlcompname));
|
||||
if (contacts.isEmpty()) {
|
||||
LOGGER.warn("Item found, but unable to build contact");
|
||||
throw new HttpNotFoundException(itemPath);
|
||||
throw new HttpNotFoundException(itemPath+" not found");
|
||||
}
|
||||
return contacts.get(0);
|
||||
} else if ("urn:content-classes:appointment".equals(contentClass)
|
||||
|
Loading…
Reference in New Issue
Block a user