Prune print of long error messages about missing file (#579)

This commit is contained in:
Kirill Fedoseev 2021-06-12 00:24:20 +03:00 committed by GitHub
parent 3cf184c391
commit 8b1a97e673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,8 +8,8 @@ function readFile(filePath, parseJson = true) {
const json = JSON.parse(content) const json = JSON.parse(content)
const timeDiff = Math.floor(Date.now() / 1000) - json.lastChecked const timeDiff = Math.floor(Date.now() / 1000) - json.lastChecked
return Object.assign({}, json, { timeDiff }) return Object.assign({}, json, { timeDiff })
} catch (e) { } catch (_) {
console.error('readFlle', e) console.error(`File ${filePath} does not exist`)
return { return {
error: 'the bridge statistics are not available' error: 'the bridge statistics are not available'
} }