It will be nice to have documentation about error handling callback in greenlock #19

Закрито
відкрито 2018-09-08 15:46:47 +00:00 користувачем Ghost · 5 коментарів
Ghost прокоментував(ла) 2018-09-08 15:46:47 +00:00

I tried to add Sentry support to handle greenlock exceptions and spent substantial amount of time to find solution of this problem.

server.on('tlsClientError', (err) => Raven.captureException(err));

This piece of code can handle greenlock promise rejections

I tried to add Sentry support to handle greenlock exceptions and spent substantial amount of time to find solution of this problem. server.on('tlsClientError', (err) => Raven.captureException(err)); This piece of code can handle greenlock promise rejections
coolaj86 прокоментував(ла) 2018-09-08 17:56:34 +00:00
Власник

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?

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?
Ghost прокоментував(ла) 2018-09-08 19:08:18 +00:00
Author

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: 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
Ghost прокоментував(ла) 2018-09-08 20:18:07 +00:00
Author

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: ``` 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
Ghost прокоментував(ла) 2018-10-26 08:13:51 +00:00
Author

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?

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?
coolaj86 прокоментував(ла) 2019-11-01 22:00:25 +00:00
Власник

Greenlock v3 now has a notify facility for handling background errors, as well as general statuses:

coolaj86/greenlock.js#24 (comment)

Greenlock v3 now has a `notify` facility for handling background errors, as well as general statuses: https://git.coolaj86.com/coolaj86/greenlock.js/issues/24#issuecomment-1371
coolaj86 закрив цю задачу 2019-11-01 22:00:25 +00:00
Підпишіться щоб приєднатися до обговорення.
Без мітки
Етап відсутній
Немає виконавця
2 учасників
Сповіщення
Дата завершення
Термін дії не дійсний або знаходиться за межами допустимого діапазону. Будь ласка використовуйте формат 'yyyy-mm-dd'.

Термін виконання не встановлений.

Залежності

No dependencies set.

Reference: coolaj86/greenlock.js-ARCHIVED#19
No description provided.