It will be nice to have documentation about error handling callback in greenlock #19
読み込み中…
新しいイシューから参照
説明はありません。
ブランチ "%!s(<nil>)" の削除
ブランチの削除は恒久的です。 実際に削除されるまでの短い期間、ブランチが存在したままになることもありますが、たいていは元に戻すことはできません。 続行しますか?
I tried to add Sentry support to handle greenlock exceptions and spent substantial amount of time to find solution of this problem.
This piece of code can handle greenlock promise rejections
I’m not at all familiar with sentry, but I definitely want you to be able to handle errors.
What is the situation in which an error occurs, what kind of error is it, how does this code help, and what can I do or change to make it easier for you to do what you’re trying to do?
Sentry (getsentry.com) allows to track exceptions. Here is an example from my service.
This piece of code:
const server = require('https');
server.createServer(lex.httpsOptions, lex.middleware(app))
server.listen(443, function () {
console.log("Listening for ACME tls-sni-01 challenges and serve app on", this.address());
});
server.on('tlsClientError', (err) => winston.error(err));
allows to add custom error handler for greenlock
Sentry (getsentry.com) allows to track exceptions. Here is an example from my service.
This piece of code:
allows to add custom error handler for greenlock
Sentry tracks any unhandled exceptions, posts them to your online saas account and emails you notification. It looks to me like a a continuous improvement tool since it notifies you of error conditions that you hadn't considered in your code for further investigation.
It's effectively a giant try catch block around your code which then logs the error and context to a database so you can be informed and query the metadata.
It looks like initially this could be handled with documentation. If someone is using the express version, they can add sentry as a wrapper against the main module - but this looks like a raven/sentry piece of info rather than anything to do with greenlock.
It might be useful to provide docs on how to override the logging and exception handling instead but that's user docs rather than code change or even usage docs.
aj - whats the best way to provide you with documentation enhancements?
gugu - are you able to create a pull request for helpful information?
Greenlock v3 now has a
notify
facility for handling background errors, as well as general statuses:coolaj86/greenlock.js#24 (コメント)