rapiz1 / rathole

A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
Apache License 2.0
8.8k stars 440 forks source link

Better Error Handling and Error Messages #332

Open sunmy2019 opened 4 months ago

sunmy2019 commented 4 months ago

Feature Proposed

I want to improve the quality of error messages and reduce the use of panic.

  1. convert unwrap() to return anyhow::Error with informative contexts.
  2. convert unwrap() to expect(...) for deadly scenarios.
  3. remove unwrap() when it can be proved with pattern matching.

Use Case This would increase its usability as a library and convey clearer messages to the users.

Known pitfalls potentially increase binary size