mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Improve HttpException error logging
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@735 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
07569c5583
commit
6164b00290
@ -379,10 +379,16 @@ public final class DavGatewayHttpClientFacade {
|
||||
int status = method.getStatusCode();
|
||||
// 440 means forbidden on Exchange
|
||||
if (status == 440) {
|
||||
return new HttpException(HttpStatus.SC_FORBIDDEN + " " + HttpStatus.getStatusText(HttpStatus.SC_FORBIDDEN));
|
||||
} else {
|
||||
return new HttpException(method.getStatusCode() + " " + method.getStatusText());
|
||||
status = HttpStatus.SC_FORBIDDEN;
|
||||
}
|
||||
StringBuilder message = new StringBuilder();
|
||||
message.append(status).append(' ').append(method.getStatusText());
|
||||
try {
|
||||
message.append(" at ").append(method.getURI().getURI());
|
||||
} catch (URIException e) {
|
||||
message.append(method.getPath());
|
||||
}
|
||||
return new HttpException();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user