All error messages in german and in englisch

This commit is contained in:
rxf
2023-05-09 15:37:27 +02:00
parent 2cf418756d
commit 347c6bdc96
17 changed files with 1007 additions and 243 deletions
+3 -4
View File
@@ -6,7 +6,6 @@ import * as mongo from "../databases/mongo.js"
import {returnOnError} from "../utilities/reporterror.js"
import {csv2Json} from "../utilities/csv2json.js"
import checkParams from "../utilities/checkparams.js"
import * as ERR from "../utilities/errortexts.js"
import {getOneProperty} from "./getproperties.js"
import {getNoiseData} from "../sensorspecials/noise.js"
import {getRadioData} from "../sensorspecials/radioact.js"
@@ -127,7 +126,7 @@ export async function getSensorData(params) {
return ret
}
}
return returnOnError(ret, ERR.CMNDUNKOWN, getActData.name)
return returnOnError(ret, 'CMNDUNKNOWN', getActData.name)
}
@@ -236,13 +235,13 @@ export const fetchFromInflux = async (ret, query) => {
let { values, err} = await influx.influxRead(query)
if(err) {
if(err.toString().includes('400')) {
return returnOnError(ret, ERR.SYNTAXURL, fetchFromInflux.name)
return returnOnError(ret, 'SYNTAXURL', fetchFromInflux.name)
} else {
return returnOnError(ret, err, fetchFromInflux.name)
}
}
if (values.length <= 2) {
return returnOnError(ret, ERR.NODATA, fetchFromInflux.name)
return returnOnError(ret, 'NODATA', fetchFromInflux.name)
}
ret.values = csv2Json(values)
return ret