Open grunklejp opened 2 years ago
Thanks for reporting this. Yes, we are not YET fully compatible here and do not properly specify the error types. I actually also like your proposal much better. This is also more extensible.
I'm interested in fully fleshing out a new error spec while simultaneously working on implementing it into Alby.
My ultimate goal is to create a small react hooks package to allow sites to effortlessly support WebLN while providing fallbacks to those without a provider.
While working on an LN React library I noticed that Alby doesn't meet the current WebLN spec by throwing the appropriate pre-defined error messages specified here: https://webln.dev/#/api/errors.
I'm not entirely certain if this project seeks to be webLN compatible, if so I could throw together a PR in an attempt to meet the spec in regards to error handling.
I have also proposed error-handling specific changes to the webln spec that might interest this project here: https://github.com/joule-labs/webln/issues/41