Kaynağa Gözat

provide a /oops-internal endpoint for testing uncaughtExceptions

Brian Gough 5 yıl önce
ebeveyn
işleme
f0b4f1238b
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6 0
      services/clsi/app.js

+ 6 - 0
services/clsi/app.js

@@ -213,6 +213,12 @@ app.get('/oops', function (req, res, next) {
   return res.send('error\n')
   return res.send('error\n')
 })
 })
 
 
+app.get('/oops-internal', function (req, res, next) {
+  setTimeout(function () {
+    throw new Error('Test error')
+  }, 1)
+})
+
 app.get('/status', (req, res, next) => res.send('CLSI is alive\n'))
 app.get('/status', (req, res, next) => res.send('CLSI is alive\n'))
 
 
 Settings.processTooOld = false
 Settings.processTooOld = false