Closed Vrock691 closed 4 months ago
POST /activity
Error: Unknown column 'Infinity' in 'field list' at Packet.asError (/home/vldsite/Social-Co2/server/node_modules/mysql2/lib/packets/packet.js:728:17) at Query.execute (/home/vldsite/Social-Co2/server/node_modules/mysql2/lib/commands/command.js:29:26) at PoolConnection.handlePacket (/home/vldsite/Social-Co2/server/node_modules/mysql2/lib/connection.js:481:34) at PacketParser.onPacket (/home/vldsite/Social-Co2/server/node_modules/mysql2/lib/connection.js:97:12) at PacketParser.executeStart (/home/vldsite/Social-Co2/server/node_modules/mysql2/lib/packet_parser.js:75:16) at Socket.<anonymous> (/home/vldsite/Social-Co2/server/node_modules/mysql2/lib/connection.js:104:25) at Socket.emit (node:events:517:28) at addChunk (node:internal/streams/readable:368:12) at readableAddChunk (node:internal/streams/readable:341:9) at Readable.push (node:internal/streams/readable:278:10) { code: 'ER_BAD_FIELD_ERROR', errno: 1054, sqlState: '42S22', sqlMessage: "Unknown column 'Infinity' in 'field list'", sql: '\n' + ' INSERT INTO activities (userID, activityType, activityCO2Impact, activityName)\n' + " VALUES ('e90oW5bPEXQQak49uuXosoi4dxE2', 'trip', Infinity, 'Trajet de 19:53') ;" }
Cela vient de ce qui est transmis par le client
activityCO2Impact
Impossible d'envoyer le CO2impact avant qu'il ne soit calculé par le serveur.
POST /activity