updated error messages

This commit is contained in:
Simon Tokumine 2011-08-25 11:15:52 +01:00
parent f10cd72e0b
commit 082807695c
3 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,3 @@
reinvestigate use of database variable now we take only from subdomain
update error messages if a query goes wrong

View File

@ -10,7 +10,7 @@ var _ = require('underscore')
// * defaults to connecting with a "READ ONLY" user to given DB if not passed a specific user_id
var PSQL = function(user_id, db, limit, offset){
var error_text = "Incorrect access parameters. If you are accessing via OAuth, please check your tokens are correct. For public users, please specify a database name."
var error_text = "Incorrect access parameters. If you are accessing via OAuth, please check your tokens are correct. For public users, please ensure your table is published."
if (!_.isString(user_id) && !_.isString(db)) throw new Error(error_text);
var me = {

View File

@ -8,7 +8,7 @@ exports['test throws error if no args passed to constructor'] = function(){
try{
var pg = new PSQL();
} catch (err){
assert.equal(err.message, "Incorrect access parameters. If you are accessing via OAuth, please check your tokens are correct. For public users, please specify a database name.");
assert.equal(err.message, "Incorrect access parameters. If you are accessing via OAuth, please check your tokens are correct. For public users, please ensure your table is published.");
}
};