We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to display my error message but I got this error:
TypeError: Cannot read properties of undefined (reading 'QueryResultError')
I know my error on my code but I want to test my display error code, so it throw an error on errors.QueryResultError. Why ?
try { const clientById: TGetClientOneData[] = await pg.query(` SELECT c.id, c.company, c.paid, c.created_at, (SELECT COUNT(id) as total FROM users WHERE company_id = $1) as total FROM clients WHERE c.id = $1 AND c.tenant_id = $2 LIMIT 1; `, [id, tenant_id]); return clientById[0]; } catch(e) { if(e instanceof errors.QueryResultError) { throw new ErrorException(e.code, e.message); } }
Nodejs v20
The text was updated successfully, but these errors were encountered:
vitaly-t
No branches or pull requests
Expected behavior
I want to display my error message but I got this error:
TypeError: Cannot read properties of undefined (reading 'QueryResultError')
Actual behavior
I know my error on my code but I want to test my display error code, so it throw an error on errors.QueryResultError. Why ?
Steps to reproduce
Environment
Nodejs v20
The text was updated successfully, but these errors were encountered: