Bläddra i källkod

provide a /oops-internal endpoint for testing uncaughtExceptions

Brian Gough 5 år sedan
förälder
incheckning
f0b4f1238b
1 ändrade filer med 6 tillägg och 0 borttagningar
  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')
 })
 
+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'))
 
 Settings.processTooOld = false