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

Kapalı
Ghost tarafından 2018-09-08 15:46:47 +00:00 açıldı · 5 yorum

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
Sahibi

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?
Yazar

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
Yazar

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
Yazar

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?
Sahibi

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

coolaj86/greenlock.js#24 (yorum)

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
Bu konuşmaya katılmak için oturum aç.
Etiket Yok
Kilometre Taşı Yok
Atanan Kişi Yok
2 Katılımcı
Bildirimler
Bitiş Tarihi
Bitiş tarihi geçersiz veya aralık dışında. Lütfen 'yyyy-aa-gg' biçimini kullanın.

Bitiş tarihi atanmadı.

Bağımlılıklar

Bağımlılık yok.

Referans: coolaj86/greenlock.js-ARCHIVED#19
Herhangi bir açıklama sağlanmadı.