yTakkar / React-Mini-Social-Network

A reactive mini-social-network created with React!! 😍🍻 - No longer maintained.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Database Nodefault value

opened this issue · comments

Hey going through your code....

When I try to register on my built version , it crashes with...

This is usually caused from an Insert that is missing a default value. What is missing from this? Surely this would be a known issue.

(node:16876) UnhandledPromiseRejectionWarning: Error: ER_NO_DEFAULT_FOR_FIELD: Field 'bio' doesn't have a default value at Query.Sequence._packetToError (/home/appsec/Desktop/React-Instagram-Clone-2.0/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14) at Query.ErrorPacket (/home/appsec/Desktop/React-Instagram-Clone-2.0/node_modules/mysql/lib/protocol/sequences/Query.js:77:18) at Protocol._parsePacket (/home/appsec/Desktop/React-Instagram-Clone-2.0/node_modules/mysql/lib/protocol/Protocol.js:279:23) at Parser.write (/home/appsec/Desktop/React-Instagram-Clone-2.0/node_modules/mysql/lib/protocol/Parser.js:76:12) at Protocol.write (/home/appsec/Desktop/React-Instagram-Clone-2.0/node_modules/mysql/lib/protocol/Protocol.js:39:16) at Socket.<anonymous> (/home/appsec/Desktop/React-Instagram-Clone-2.0/node_modules/mysql/lib/Connection.js:103:28) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) -------------------- at Protocol._enqueue (/home/appsec/Desktop/React-Instagram-Clone-2.0/node_modules/mysql/lib/protocol/Protocol.js:145:48) at Connection.query (/home/appsec/Desktop/React-Instagram-Clone-2.0/node_modules/mysql/lib/Connection.js:208:25) at Promise (/home/appsec/Desktop/React-Instagram-Clone-2.0/config/db.js:13:8) at new Promise (<anonymous>) at Object.query (/home/appsec/Desktop/React-Instagram-Clone-2.0/config/db.js:12:10) at bcrypt.hash (/home/appsec/Desktop/React-Instagram-Clone-2.0/config/User.js:23:10) at /home/appsec/Desktop/React-Instagram-Clone-2.0/node_modules/bcrypt-nodejs/bCrypt.js:631:3 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) (node:16876) 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(). (rejection id: 1) (node:16876) [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.

I am sorry I opened an issue on the wrong one. There is one just like this.