Explorar el Código

provide a /oops-internal endpoint for testing uncaughtExceptions

Brian Gough hace 5 años
padre
commit
f0b4f1238b
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  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