Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email owner if invoice creation failed #74

Open
Sjors opened this issue Jul 16, 2018 · 0 comments
Open

Email owner if invoice creation failed #74

Sjors opened this issue Jul 16, 2018 · 0 comments
Labels
Rails Ruby on Rails

Comments

@Sjors
Copy link
Owner

Sjors commented Jul 16, 2018

If invoice creation fails, e.g. because the lightning node crashed, it currently just sends an exception notification:

[Matreon Exception]  (Net::ReadTimeout) "Net::ReadTimeout"

A Net::ReadTimeout occurred in background at 2018-07-06 23:32:14 UTC :

Net::ReadTimeout
/app/vendor/ruby-2.4.2/lib/ruby/2.4.0/net/protocol.rb:176:in `rbuf_fill'
-------------------------------
Backtrace:
[...]
/app/app/models/invoice.rb:103:in `create_lightning_charge_invoice'
/app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:413:in `block in make_lambda'
[...]
/app/app/models/contribution.rb:41:in `create_or_update_invoice!'
/app/app/models/invoice.rb:38:in `block in generate!'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/app/app/models/invoice.rb:37:in `generate!'
/app/lib/tasks/invoices.rake:8:in `block (2 levels) in <top (required)>'
[...]

This is much too cryptic for such an important error. This exception should be caught instead and result in the owner receiving an email that invoice creation failed (and some info as to why).

@Sjors Sjors added the Rails Ruby on Rails label Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rails Ruby on Rails
Projects
None yet
Development

No branches or pull requests

1 participant