parseable icon indicating copy to clipboard operation
parseable copied to clipboard

Use actix_web::Error for top level error handling.

Open trueleo opened this issue 3 years ago • 0 comments

On handlers for endpoints, instead of using HttpResponse as return type it should be replaced with Result<HttpResponce, actix_web::Error>. This change is tied up to #2 and can't be implemented without these being worked on first.

Reference

  • https://actix.rs/docs/errors/
  • https://www.lpalmieri.com/posts/error-handling-rust/

Todo

  • [ ] Have smaller error types with appropriate error messages.
  • [ ] Conversion from these custom error types to actix_web::Error

trueleo avatar Aug 30 '22 15:08 trueleo