loleaflet/src/core/Socket.js | 1 + wsd/LOOLWSD.cpp | 8 +++++++- wsd/Storage.cpp | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-)
New commits: commit 4e6fee5407219371945edf2ec49b90a333a8311d Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Mon May 22 00:26:07 2017 -0400 Hide connecting spinner on authorization failure Also, fix regression resulting in "This is embarrassing..." instead of "Unauthorized..." message. Change-Id: If6219bfbc445b186bb4064b3f20a0ccd2854d617 Reviewed-on: https://gerrit.libreoffice.org/37893 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 6d1ee6bb..25f5f83f 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -344,6 +344,7 @@ L.Socket = L.Class.extend({ this._map.fire('error', {msg: errorMessages.diskfull}); } else if (command.errorKind === 'unauthorized') { + this._map.hideBusy(); this._map.fire('error', {msg: errorMessages.unauthorized}); } diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 84d332a7..a2e868d9 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2122,6 +2122,13 @@ private: // Add and load the session. docBroker->addSession(clientSession); } + catch (const UnauthorizedRequestException& exc) + { + LOG_ERR("Unauthorized Request while loading session for " << docBroker->getDocKey() << ": " << exc.what()); + const std::string msg = "error: cmd=internal kind=unauthorized"; + clientSession->sendMessage(msg); + docBroker->stop(); + } catch (const std::exception& exc) { LOG_ERR("Error while handling loading : " << exc.what()); @@ -2136,7 +2143,6 @@ private: } docBroker->stop(); } - }); }); } diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp index 6e8c1dff..d096ea3e 100644 --- a/wsd/Storage.cpp +++ b/wsd/Storage.cpp @@ -472,7 +472,7 @@ std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const st } catch(const Poco::Exception& pexc) { - LOG_ERR("Cannot get file info from WOPI storage uri [" + uriObject.toString() + "]. Error: " << pexc.displayText() << + LOG_ERR("Cannot get file info from WOPI storage uri [" << uriObject.toString() << "]. Error: " << pexc.displayText() << (pexc.nested() ? " (" + pexc.nested()->displayText() + ")" : "")); throw; } @@ -521,7 +521,7 @@ std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const st else { LOG_ERR("WOPI::CheckFileInfo failed and no JSON payload returned. Access denied."); - throw UnauthorizedRequestException("Access denied."); + throw UnauthorizedRequestException("Access denied. WOPI::CheckFileInfo failed on: " + uriObject.toString()); } Poco::Timestamp modifiedTime = Poco::Timestamp::fromEpochTime(0); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits