1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 03:02:22 -05:00

Carddav: return 404 not found on missing folder

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1247 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-07-21 15:39:51 +00:00
parent 3a9c3daae4
commit a2ddfeb643
2 changed files with 5 additions and 2 deletions

View File

@ -160,7 +160,9 @@ public class CaldavConnection extends AbstractConnection {
} catch (SocketException e) {
DavGatewayTray.debug(new BundleMessage("LOG_CONNECTION_CLOSED"));
} catch (Exception e) {
DavGatewayTray.log(e);
if (!(e instanceof HttpNotFoundException)) {
DavGatewayTray.log(e);
}
try {
sendErr(e);
} catch (IOException e2) {

View File

@ -20,6 +20,7 @@ package davmail.exchange.ews;
import davmail.exception.DavMailAuthenticationException;
import davmail.exception.DavMailException;
import davmail.exception.HttpNotFoundException;
import davmail.exchange.ExchangeSession;
import davmail.http.DavGatewayHttpClientFacade;
import davmail.util.IOUtil;
@ -1041,7 +1042,7 @@ public class EwsExchangeSession extends ExchangeSession {
private FolderId getFolderId(String folderPath) throws IOException {
FolderId folderId = getFolderIdIfExists(folderPath);
if (folderId == null) {
throw new DavMailException("EXCEPTION_FOLDER_NOT_FOUND", folderPath);
throw new HttpNotFoundException("Folder '"+folderPath+"' not found");
}
return folderId;
}