Skip to content

Postman issues tried different solution gettings bad results #4

@dylanrychlik

Description

@dylanrychlik

I get this issue in postman: I set appropriate Header: Content-Type: application/json and looked at your code in github. I also set body from test to json in postman. Please help

UnhandledPromiseRejectionWarning: Error: WHERE parameter “username” has invalid “undefined” value at MySQLQueryGenerator.whereItemQuery (C:\Users\dylan\Documents\node-js-jwt-auth\node_modules\sequelize\lib\dialects\abstract\query-generator.js:2258:13) at C:\Users\dylan\Documents\node-js-jwt-auth\node_modules\sequelize\lib\dialects\abstract\query-generator.js:2247:25 at Array.forEach () at MySQLQueryGenerator.whereItemsQuery (C:\Users\dylan\Documents\node-js-jwt-auth\node_modules\sequelize\lib\dialects\abstract\query-generator.js:2245:35) at MySQLQueryGenerator.getWhereConditions (C:\Users\dylan\Documents\node-js-jwt-auth\node_modules\sequelize\lib\dialects\abstract\query-generator.js:2663:19) at MySQLQueryGenerator.selectQuery (C:\Users\dylan\Documents\node-js-jwt-auth\node_modules\sequelize\lib\dialects\abstract\query-generator.js:1316:28) at MySQLQueryInterface.select (C:\Users\dylan\Documents\node-js-jwt-auth\node_modules\sequelize\lib\dialects\abstract\query-interface.js:939:27) at Function.findAll (C:\Users\dylan\Documents\node-js-jwt-auth\node_modules\sequelize\lib\model.js:1753:47) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Function.findOne (C:\Users\dylan\Documents\node-js-jwt-auth\node_modules\sequelize\lib\model.js:1917:12) (node:22656) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag –unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:22656) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions