0
它在快速查看鏈接中執行。如何在Restify中實現烏鴉?
https://docs.sentry.io/clients/node/integrations/express/
,但它不是在的RESTify實現。
https://github.com/getsentry/raven-node/issues/287
謝謝。
它在快速查看鏈接中執行。如何在Restify中實現烏鴉?
https://docs.sentry.io/clients/node/integrations/express/
,但它不是在的RESTify實現。
https://github.com/getsentry/raven-node/issues/287
謝謝。
我已經完成了這個。 restify 6.0.1
var Raven = require("raven");
Raven.config("--yourdsnofraven--").install();
when server created add this `handleUncaughtExceptions`.
global.server = restify.createServer({
handleUncaughtExceptions: true
});
// capture error here
server.on("uncaughtException", function (req, res, route, err) {
"use strict";
console.log("i caught it!");
Raven.captureException(err, {req: req});
res.send(new httpErrors.InternalServerError(CONFIG.error_message.INTERNAL_SERVER_ERROR));
});