We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8279bfe commit 61da0bfCopy full SHA for 61da0bf
packages/cubejs-testing/birdbox-fixtures/postgresql/single/sqlapi.js
@@ -15,6 +15,15 @@ module.exports = {
15
checkSqlAuth: async (req, user, password) => {
16
console.log('MN CHECK: REQUEST: ', { req });
17
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
27
if (user === 'admin') {
28
if (password && password !== 'admin_password') {
29
throw new Error(`Password doesn't match for ${user}`);
0 commit comments