We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3742e4 commit ac6021aCopy full SHA for ac6021a
lib/status/index.js
@@ -4,14 +4,19 @@ const realtime = require('../realtime/realtime')
4
const config = require('../config')
5
6
exports.getStatus = async (req, res) => {
7
- const data = await realtime.getStatus()
8
-
9
res.set({
10
'Cache-Control': 'private', // only cache by client
11
'X-Robots-Tag': 'noindex, nofollow', // prevent crawling
12
'Content-Type': 'application/json'
13
})
14
- res.send(data)
+
+ try {
+ const data = await realtime.getStatus()
15
+ res.send(data)
16
+ } catch (e) {
17
+ console.error(e)
18
+ res.status(500).send(e.toString())
19
+ }
20
}
21
22
exports.getMetrics = async (req, res) => {
0 commit comments