Caldav: improve 404 error handling
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1240 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
03927f53dc
commit
534c129660
|
@ -24,6 +24,7 @@ import davmail.DavGateway;
|
|||
import davmail.Settings;
|
||||
import davmail.exception.DavMailAuthenticationException;
|
||||
import davmail.exception.DavMailException;
|
||||
import davmail.exception.HttpNotFoundException;
|
||||
import davmail.exchange.ExchangeSession;
|
||||
import davmail.exchange.ExchangeSessionFactory;
|
||||
import davmail.exchange.ICSBufferedReader;
|
||||
|
@ -991,8 +992,12 @@ public class CaldavConnection extends AbstractConnection {
|
|||
if (message == null) {
|
||||
message = e.toString();
|
||||
}
|
||||
if (e instanceof HttpNotFoundException) {
|
||||
sendErr(HttpStatus.SC_NOT_FOUND, message);
|
||||
} else {
|
||||
sendErr(HttpStatus.SC_SERVICE_UNAVAILABLE, message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send 400 bad response for unsupported request.
|
||||
|
|
Loading…
Reference in New Issue