Removing try catch wrap.

This commit is contained in:
mike12345567 2025-02-13 18:17:07 +00:00
parent 52d8d7d1dc
commit e7f42a0075
1 changed files with 11 additions and 15 deletions

View File

@ -119,23 +119,19 @@ export function areRESTVariablesValid(datasource: Datasource) {
} }
export function checkDatasourceTypes(schema: Integration, config: any) { export function checkDatasourceTypes(schema: Integration, config: any) {
try { for (let key of Object.keys(config)) {
for (let key of Object.keys(config)) { if (!schema.datasource?.[key]) {
if (!schema.datasource?.[key]) { continue
continue }
} const type = schema.datasource[key].type
const type = schema.datasource[key].type if (
if ( type === DatasourceFieldType.NUMBER &&
type === DatasourceFieldType.NUMBER && typeof config[key] === "string"
typeof config[key] === "string" ) {
) { config[key] = parseFloat(config[key])
config[key] = parseFloat(config[key])
}
} }
return config
} catch (err) {
console.log(err)
} }
return config
} }
async function enrichDatasourceWithValues( async function enrichDatasourceWithValues(