My take on error handling and logging with Actix.

  • Panic vs Result and the use of expect and unwrap.
  • Custom errors and error handling in Actix
  • Logging for Actix (and Rust in general)

If you don’t want to handle Logger objects take a look at slog-scope: https://github.com/slog-rs/scope

As an alternative you can try the tracing library: https://github.com/tokio-rs/tracing

Let me know if I made a mistake or if there is a better way of doing this.

Source code:
https://github.com/nemesiscodex/actix-todo

Actix repository:
https://github.com/actix/actix-web

Actix web page:
https://actix.rs/

Rust lang page:
https://www.rust-lang.org/

Code editor/IDE:
https://code.visualstudio.com/

#rust #actix #web-development

Rust Tutorial - Error handling and Logging with Actix
60.50 GEEK