Skip to content

Commit

Permalink
fix: added more verbose logging
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jun 18, 2024
1 parent a75cdc6 commit c7577bb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions helpers/mongoose-to-sqlite.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,11 @@ async function find(
)
throw new TypeError('WebSocketAsPromised instance required');

if (typeof session?.user?.password !== 'string')
throw new TypeError('Session user and password missing');
if (typeof session?.user?.password !== 'string') {
const err = new TypeError('Session user and password missing');
err.session = session;
throw err;
}

const condition = prepareQuery(mapping, filter);

Expand Down

0 comments on commit c7577bb

Please sign in to comment.