payjoin / nolooking

Batched Channels from a PayJoin ⚡️🔀
41 stars 8 forks source link

Don't panic, handle errors. #57

Closed DanGould closed 1 year ago

DanGould commented 1 year ago

Fix "unwrap()s everywhere" disclaimer by handling errors. They still need to propagate to the UI.

HttpErrors still need to be returned with proper HTTP status codes

There are still 2 unwraps on mutex locks let mut pj_by_spk = self.pjs.lock().unwrap(); which should probably panic with expect instead. What do you think?

I also need to add @evanlinjin as co-author of the HttpError. Work from #10 finally making it in!

fix #33

50 could be fixed in this PR by pushing an update to the front end. but this at least responds by passing the error to the sender where they should end up in logs

nickfarrow commented 1 year ago

Looks good to me! Great stuff.

Yep expect sounds right to use expects there, probably not worth retries or anything complex