diff --git a/esp/services/ws_store/espstorelib/daliKVStore.cpp b/esp/services/ws_store/espstorelib/daliKVStore.cpp index 9e7774b578c..cc45f00ce40 100644 --- a/esp/services/ws_store/espstorelib/daliKVStore.cpp +++ b/esp/services/ws_store/espstorelib/daliKVStore.cpp @@ -473,15 +473,11 @@ bool CDALIKVStore::fetch(const char * storename, const char * ns, const char * k encodePTreeName(encodedKey, key); xpath.appendf("/%s", encodedKey.str()); if(!storetree->hasProp(xpath.str())) - { - throw makeStringExceptionV(ECLWATCH_INVALID_QUERY_KEY, "DALI Keystore fetch: invalid key '%s' detected!", key); - } + return false; else - { value.set(storetree->queryProp(xpath.str())); - } - return value.str(); + return true; } else throw makeStringException(-1, "DALI Keystore fetch: Key not provided!"); diff --git a/esp/services/ws_store/ws_storeService.cpp b/esp/services/ws_store/ws_storeService.cpp index c9fd66c20ed..24b9dfea8fb 100644 --- a/esp/services/ws_store/ws_storeService.cpp +++ b/esp/services/ws_store/ws_storeService.cpp @@ -313,25 +313,11 @@ bool CwsstoreEx::onFetch(IEspContext &context, IEspFetchRequest &req, IEspFetchR storename = m_defaultStore.get(); } - try - { - m_storeProvider->fetch(storename, req.getNamespace(), req.getKey(), value, secuser.get(), !req.getUserSpecific()); + bool success = m_storeProvider->fetch(storename, req.getNamespace(), req.getKey(), value, secuser.get(), !req.getUserSpecific()); + if (success) resp.setValue(value.str()); - } - catch(IException * e) - { - if (e->errorCode() == ECLWATCH_INVALID_QUERY_KEY) - { - StringBuffer msg; - LOG(MCuserInfo, "WsStore: %s", e->errorMessage(msg).str()); - e->Release(); - return false; - } - else - throw e; - } - return true; + return success; } bool CwsstoreEx::onFetchKeyMetadata(IEspContext &context, IEspFetchKeyMDRequest &req, IEspFetchKeyMDResponse &resp)