liamcottle / meshtastic-map

A map of all Meshtastic nodes heard via MQTT.
https://meshtastic.liamcottle.net
MIT License
74 stars 21 forks source link

some air_util_tx out of range for database schema #37

Open fifieldt opened 4 months ago

fifieldt commented 4 months ago

Received the error below:

PrismaClientKnownRequestError: 
Invalid `prisma.deviceMetric.create()` invocation in
src/mqtt.js:544:51

  541 
  542 // create metric if no duplicates found
  543 if(!existingDuplicateDeviceMetric){
→ 544     await prisma.deviceMetric.create(
Value out of range for the type. Out of range value for column 'air_util_tx' at row 1
    at In.handleRequestError (node_modules/@prisma/client/runtime/library.js:122:6854)
    at In.handleAndLogRequestError (node_modules/@prisma/client/runtime/library.js:122:6188)
    at In.request (node_modules/@prisma/client/runtime/library.js:122:5896)
    at async l (node_modules/@prisma/client/runtime/library.js:127:10871)
    at async MqttClient.<anonymous> (src/mqtt.js:544:25) {
  code: 'P2020',
  clientVersion: '5.11.0',
  meta: {
    modelName: 'DeviceMetric',
    details: "Out of range value for column 'air_util_tx' at row 1"
  }
}
PrismaClientKnownRequestError: 
Invalid `prisma.node.updateMany()` invocation in
src/mqtt.js:564:39

  561 // update node telemetry in db
  562 if(Object.keys(data).length > 0){
  563     try {
→ 564         await prisma.node.updateMany(
Value out of range for the type. Out of range value for column 'air_util_tx' at row 1
    at In.handleRequestError (node_modules/@prisma/client/runtime/library.js:122:6854)
    at In.handleAndLogRequestError (node_modules/@prisma/client/runtime/library.js:122:6188)
    at In.request (node_modules/@prisma/client/runtime/library.js:122:5896)
    at async l (node_modules/@prisma/client/runtime/library.js:127:10871)
    at async MqttClient.<anonymous> (src/mqtt.js:564:21) {
  code: 'P2020',
  clientVersion: '5.11.0',
  meta: {
    modelName: 'Node',
    details: "Out of range value for column 'air_util_tx' at row 1"
  }
}