Skip to content

Commit 61da0bf

Browse files
committed
dev
1 parent 8279bfe commit 61da0bf

File tree

1 file changed

+9
-0
lines changed
  • packages/cubejs-testing/birdbox-fixtures/postgresql/single

1 file changed

+9
-0
lines changed

packages/cubejs-testing/birdbox-fixtures/postgresql/single/sqlapi.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ module.exports = {
1515
checkSqlAuth: async (req, user, password) => {
1616
console.log('MN CHECK: REQUEST: ', { req });
1717

18+
if (!req) {
19+
throw new Error('Request is not defined');
20+
}
21+
22+
const missing = ['protocol', 'method'].filter(key => !(key in req));
23+
if (missing.length) {
24+
throw new Error(`Request object is missing required field(s): ${missing.join(', ')}`);
25+
}
26+
1827
if (user === 'admin') {
1928
if (password && password !== 'admin_password') {
2029
throw new Error(`Password doesn't match for ${user}`);

0 commit comments

Comments
 (0)