Explorar o código

provide a /oops-internal endpoint for testing uncaughtExceptions

Brian Gough %!s(int64=5) %!d(string=hai) anos
pai
achega
f0b4f1238b
Modificáronse 1 ficheiros con 6 adicións e 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