updated error messages
This commit is contained in:
parent
f10cd72e0b
commit
082807695c
1
TODO.md
1
TODO.md
@ -1,4 +1,3 @@
|
||||
reinvestigate use of database variable now we take only from subdomain
|
||||
update error messages if a query goes wrong
|
||||
|
||||
|
||||
|
@ -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 = {
|
||||
|
@ -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.");
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user