mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12:22 -05:00
EWS: return HttpNotFoundException on event not found to trigger Lightning workaround
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1601 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
adb9b317ce
commit
a2fbd71943
@ -1406,7 +1406,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
public Item getItem(String folderPath, String itemName) throws IOException {
|
public Item getItem(String folderPath, String itemName) throws IOException {
|
||||||
EWSMethod.Item item = getEwsItem(folderPath, itemName);
|
EWSMethod.Item item = getEwsItem(folderPath, itemName);
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
throw new DavMailException("EXCEPTION_ITEM_NOT_FOUND");
|
throw new HttpNotFoundException(itemName + " not found in "+folderPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
String itemType = item.type;
|
String itemType = item.type;
|
||||||
@ -1420,7 +1420,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
executeMethod(getItemMethod);
|
executeMethod(getItemMethod);
|
||||||
item = getItemMethod.getResponseItem();
|
item = getItemMethod.getResponseItem();
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
throw new DavMailException("EXCEPTION_ITEM_NOT_FOUND");
|
throw new HttpNotFoundException(itemName + " not found in "+folderPath);
|
||||||
}
|
}
|
||||||
return new Contact(item);
|
return new Contact(item);
|
||||||
} else if ("CalendarItem".equals(itemType)
|
} else if ("CalendarItem".equals(itemType)
|
||||||
@ -1429,7 +1429,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
|||||||
|| "Message".equals(itemType)) {
|
|| "Message".equals(itemType)) {
|
||||||
return new Event(item);
|
return new Event(item);
|
||||||
} else {
|
} else {
|
||||||
throw new DavMailException("EXCEPTION_ITEM_NOT_FOUND");
|
throw new HttpNotFoundException(itemName + " not found in "+folderPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user