diff --git a/lib/adapters/http.js b/lib/adapters/http.js index 4d5856f8..f8f331df 100644 --- a/lib/adapters/http.js +++ b/lib/adapters/http.js @@ -15,7 +15,9 @@ WebService.prototype.define = function defineModel(descr) { }; WebService.prototype.getResourceUrl = function getResourceUrl(model) { - return this._models[model].settings.restPath; + var url = this._models[model].settings.restPath; + if (!url) throw new Error('Resource url (restPath) for ' + model + ' is not defined'); + return url; }; WebService.prototype.getBlankReq = function () {