Commit 749311a1 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1095 Use ServiceUnavailableException when Kopano is unavailable.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 136d14ec
......@@ -176,7 +176,7 @@ class BackendKopano implements IBackend, ISearchProvider {
if (mapi_last_hresult()) {
ZLog::Write(LOGLEVEL_ERROR, sprintf("KopanoBackend->Logon(): login failed with error code: 0x%X", mapi_last_hresult()));
if (mapi_last_hresult() == MAPI_E_NETWORK_ERROR)
throw new HTTPReturnCodeException("Error connecting to KC (login)", 503, null, LOGLEVEL_INFO);
throw new ServiceUnavailableException("Error connecting to KC (login)");
}
}
catch (MAPIException $ex) {
......@@ -193,7 +193,7 @@ class BackendKopano implements IBackend, ISearchProvider {
$this->defaultstore = $this->openMessageStore($this->mainUser);
if (mapi_last_hresult() == MAPI_E_FAILONEPROVIDER)
throw new HTTPReturnCodeException("Error connecting to KC (open store)", 503, null, LOGLEVEL_INFO);
throw new ServiceUnavailableException("Error connecting to KC (open store)");
if($this->defaultstore === false)
throw new AuthenticationRequiredException(sprintf("KopanoBackend->Logon(): User '%s' has no default store", $user));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment